How to use a treeview control
(Saturday, August 28, 2004)
Found the following interesting discussion in the Newsgroups:
Treeview control by: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
| | | Reply: by:Robin Tucker
| | | 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).
| | | Reply: by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])
| | |
\\Me.TreeView1.SelectedNode = Me.TreeView1.Nodes(10) ///
-- Herfried K. Wagner [MVP] URL:http://dotnet.mvps.org/
| | | Reply: by:Rich
| | | Thanks Herfried, that worked perfectly.
Richard
|
Posted by Xander Zelders

|
0 Comments:
Post a Comment
<< Home