fmichail
asked on
How to select a node in the tree control programatically in vb.net
I have a populated tree control, and I want programatically to set focus (with highlight) to a specific node, that could be in the visible area or not (including moving to the top or bottom. How to do that programatically in vb.net
Thanks in advance
Thanks in advance
Bear in mind that the treeview may not be focussed (depending on when you are selecting the node). If you want to subsiquently focus it you can use Me.TreeView1.Focus()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you slow mo
This will select the second root node
To select the first child node of a second root node use this:
Me.TreeView1.SelectedNode = Me.TreeView1.Nodes(1).Node