![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Trace the selected item in a list box to the module Topic Summary: How can this be done? Created On: 29-Aug-2008 17:25 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi All,
I am working on a process that shows object headings in a list box. When I select an object heading, all the objects' text (requirements) under this heading is displayed in a second list box. I worked out that part of the script. What I want is the following: When I select a requirement (object text) in the second list box, I want the script to assign a specified enumerated value to one of the attributes of this object in the module. One way would be to read the object identifier along with the object text, extract the object identifier from it, and then trace it back to the module. But there could be a simpler way of doing it. Can anyone suggest how I go about it? - Krishna |
|
![]() |
|
![]() |
|
When you add the items to the list add them also to a skip list
put(ListSkip, i, o) where i is the integer storing the position in the skip list and o is the corresponding object. Then when you read the list box selected item, you get an integer which you can use to find the object from the skip list. ------------------------- Pekka.Makinen@softqa.fi SoftQA Oy -http://www.softqa.fi/ |
|
![]() |
|
![]() |
|
Thanks, Pekka, for the suggestion. In fact I am already using the skip list in the form you suggested, to display the headings in the lsit in the (reverse) order they appear in the module.
Can we provide horizontal scroll bars for the list? Some requirement text is overflowing the width of the list and either a CR function or horizontal scroll bar will make the whole text readable. - Krishna |
|
![]() |
|
![]() |
|
Hi,
If you use a listView DBE instead of a list DBE then you can add multiple columns which are all individually sizeable upon creation and then resizable by the user once up and running. listViews are a little more complex than normal lists. see DBE listView in the Dxl reference manual. Before any values are added to the listview, use insertColumn (after you have realised you dialog box). Add rows to the listView using insert, update listview columns using the set(DBE, row, column, (icon|string)) command, and when you want to read the value, use getColumnValue instead of just get. Callbacks are different too, use set(DBE, click, deselect, double-click) to set the callbacks (each function must take a DBE and int parameter) or use set(DBE, checked) to capture the event of the tick box being pressed (where checked is another function with a DBE and int parameter). listViews also alow drag and drop between other listViews or treeViews for more complex dialog boxes. Its all in the DXL reference manual. As for CR, there is no way to use CR in either a list or listView unless you manaually break the requirement text up and insert it as separate line items in your list. Would look really messy though and would make things like sort and selection tricky to handle. Hope this helps, Paul |
|
![]() |
|
![]() |
|
Hi Paul,
Thanks for the tip about the listView. Since I wanted only one column listing all the requirement text, I created a single column listView. I am collecting the object text of selected objects in a skip list and then inserting the object text in the list view. I selected the column width sufficiently long to display the entire string of the object text. This created longitudinal scroll bars. When I insert the object text from the skip list to the rows of listView, if the string is long, the display in the listView is getting truncated. However, if I print the same text in the output box, the entire text is being displayed. Is there any limitation of the string that can be displayed in a row of the listView? The column is quite wide - I can see a lot of blank space after the truncated string. - Krishna |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.