TreeView node Selection

Hi all,

Has anyone used the Microsoft TreeView Control v6? If so do you know how to select a node when displayed. Example build a menu with the treeview, and then programmatically select a node.

I used the Com Viewer (Progress) to view the events and methods and could find nothing so looked at the Microsoft website and found some info at:

http://msdn.microsoft.com/library/d...f/com.ms.wfc.ui.TreeView_setSelectedNode.html

But can't seem to get it to work.

I have written the following in my code, which gives no error msg, but also does nothing:

hTView:setSelectedNode(hTView2:INDEX).

hTView and hTView 2 are both com-handles that I have set.

Please if anyone can help me it would be greatly appreciated.

Thank you in advance for any help you can offer.

Wayne Singh
 
P

PaulD

Guest
The only way that I know how to set the selection programmatically is to peform the following code:

define variable ch as com-handle.

/*set the com handle to the node you want to select via:*/

ch = chCtrlFrame:Treeview:Nodes:Item(index).

/*Assign the selected node*/
chCtrlFrame:Treeview:SelectedItem = ch.
chCtrlFrame:Treeview:dropHighlight = ch.


Hope this helps

Message imported from PEG email list
 
Top