mailsuhail
asked on
node selection
how do we select a particular node in a treeview? Or what is the equivalent for treeview in the following example of listbox.
private sub form_load()
list1.listindex= 0
end sub
private sub form_load()
list1.listindex= 0
end sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
set treeview1.selecteditem = treeview1.nodes(anode.key)
Where treeview1 is the treeview control and anode is a treeview node
or like Inteqam said
treeview.nodes.item(1).sel
you can use my answer for multi selection , i think
ASKER
when i pasted this code (suggested by Inteqam) in the Form_load event it worked fine but when i tried it in Command_clik event it didn't work. Why?
i think when clicking it , it will be selected automatically.
but make sure that the hide selection property of the tree view is false.
but make sure that the hide selection property of the tree view is false.
ASKER