Treeview control

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

Hi,

I have a treeview in a Windows form. I want to be able to set a node as
default when the form opens programmatically. Can anyone tell me how this
can be done in vb.net (I think you use SelectedNode but I can't get this to
work)??

Best Regards
Rich
 
Yes, you set SelectedNode to the node you want selected. However, you will
need to "find" this node by traversing the tree (or, like me, by looking it
up in a hashtable relation of key to treenode).
 
* "Rich said:
I have a treeview in a Windows form. I want to be able to set a node as
default when the form opens programmatically. Can anyone tell me how this
can be done in vb.net (I think you use SelectedNode but I can't get this to
work)??

\\\
Me.TreeView1.SelectedNode = Me.TreeView1.Nodes(10)
///
 
Back
Top