Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Sizing Text Box in a Canvas
Topic Summary:
Created On: 1-Dec-2003 19:15
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Tony Goodman, on Monday, March 8, 2004 4:52 PM

Answer:
Problem1: I still find laying out dialog box elements a bit of a black art. In this case make sure the text box is unattached at right and bottom. I have also changed the width and height parameters.

Problem2: the frames are not associated with tabs, so you have to manage the hiding and showing of DBEs yourself. The way I do it is to have a skip list for each frame. This skip list contains all the elements inside that frame as well as the frame itself. When you create a DBE, add it to the appropriate skip list.

A "tab skip list" is used to hold the "frame skip lists". This is used by the showSelected() function to hide/show the appropriate elements.

I have modified your code and added some new functions. See the attached.

Hope this helps.
 1-Dec-2003 19:15
User is offline View Users Profile Print this message


Srikanth Chalasani

Posts: 13
Joined: 4-Nov-2003

My main objective is to create a dialog box for entering data which I will add into a module. I am facing two problems .
Problem 1: My text box occupies the whole Frame. I want it to have a width and length of 10 .
Problem 2: when I click on other tabs, my text box is still visible in other frames. How are frames associated with Tabs ?

Here is my code. Your time and help are most appreciated.

const string tabStrings[] = {"Failure", "History", "Notification"}
DB box = centered "Example"
DBE theTab, Frame1, Frame2, Frame3 , theTextBox
void tabCb(DBE clicktab) {
int i = get clicktab
if (i == 0) {
show Frame1
} else {
hide Frame1
}
if (i == 1) {
show Frame2
} else {
hide Frame2
}
if (i == 2) {
show Frame3
} else {
hide Frame3
}
}

theTab = tab(box, tabStrings, 800, 500, tabCb)
theTab->"left"->"form"
theTab->"right"->"form"
theTab->"top"->"form"
theTab->"bottom"->"form"

Frame1 = frame(box, "Test Case Details", 100, 100)
Frame1->"left"->"inside"->theTab
Frame1->"right"->"inside"->theTab
Frame1->"top"->"inside"->theTab
Frame1->"bottom"->"inside"->theTab

Frame2 = frame(box, "History", 100, 100)
Frame2->"left"->"inside"->theTab
Frame2->"right"->"inside"->theTab
Frame2->"top"->"inside"->theTab
Frame2->"bottom"->"inside"->theTab


Frame3 = frame(box, "Notification", 100, 100)
Frame3->"left"->"inside"->theTab
Frame3->"right"->"inside"->theTab
Frame3->"top"->"inside"->theTab
Frame3->"bottom"->"inside"->theTab


theTextBox = text(box,"Test Case ID:",null,10,10,false)
theTextBox->"left"->"inside"->Frame1
theTextBox->"right"->"inside"->Frame1
theTextBox->"top"->"inside"->Frame1
theTextBox->"bottom"->"inside"->Frame1

realize box
tabCb theTab
show box



thanks
Srikanth
Report this to a Moderator Report this to a Moderator
 2-Dec-2003 09:37
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
Problem1: I still find laying out dialog box elements a bit of a black art. In this case make sure the text box is unattached at right and bottom. I have also changed the width and height parameters.

Problem2: the frames are not associated with tabs, so you have to manage the hiding and showing of DBEs yourself. The way I do it is to have a skip list for each frame. This skip list contains all the elements inside that frame as well as the frame itself. When you create a DBE, add it to the appropriate skip list.

A "tab skip list" is used to hold the "frame skip lists". This is used by the showSelected() function to hide/show the appropriate elements.

I have modified your code and added some new functions. See the attached.

Hope this helps.


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 3-Dec-2003 14:12
User is offline View Users Profile Print this message


Srikanth Chalasani

Posts: 13
Joined: 4-Nov-2003

That helped. Thank you Tony
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.