I have created a pop-dailog with a tree view of a formal module's requirement object's ID, Req Text and in,out links along with the ID, requirement text of all in/out links. I nee to create two buttons on the dialog box to expand (or collapse) all sub-nodes (sub-trees) of the treeView, please? Sample DXL code for the expand./ collapse features will be greatly appreciated. I have created treeView of a module's requirement objects and their in, out links without creating a list view or skip list. Also, is there a way to display OLE images on the tree branches/nodes, when the requirement text that has OLE embedded? For inserting obj_id & req_text, I am passing iconNone. It is giving big gap between node head and the text, is there a way to not have blank space in case of iconNone? Also please, when script is processing a DOORS folder with number of modules, is it possible to display status message info at the bottom the treeview dialog, informing user of module 1 completed, mod 2 completed etc? Thanks in advance and best regards, Mike Melon
MikeMelon - Fri Apr 18 14:44:29 EDT 2014 |
Re: Expand, Collapse all nodes of DOORS TreeView Hi Mike,
The way I did it was to select every node in the tree in turn as I added it. You can definitely optimise this, but it works. Easiest way is to empty your list, then re-insert your tree items and set each one as the current tree item just after adding it. See below (where dbeTree is your tree view)
for o in m do{
insert(dbeTree, o."DXL for tree path" "", iconFolder, iconFolderOpen)
set(dbeTree, o."DXL for tree path" "")
}
|