Hello Brian
To add children to a node you have to get a reference to the node you want
to add children to then use the Nodes.Add methof of the node. The code
below adds three levels of nodes using for-next loops. It should provide
youy with a demonstration of how to populate a treeview
Dim TopNode As TreeNode
Dim SecondNode As TreeNode
Dim ThirdNode As TreeNode
With Me.TreeView1
For MyCount1 As Integer = 0 To 5
'adds top level node
TopNode = .Nodes.Add("TopNode" & MyCount1)
For MyCount2 As Integer = 0 To 5
'adds second level node
SecondNode = TopNode.Nodes.Add("SecondLevelNode" & MyCount2)
For MyCount3 As Integer = 0 To 5
'adds third level node
SecondNode.Nodes.Add("ThirdLevelNode" & MyCount3)
Next
Next
Next
End With
--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================
Pocket PC Return On Investment Calculator
Free Download
http://64.78.34.175/mcsnet/kwickKalk1.aspx
"Brian Henry" <brianiup[remove-me]@adelphia.net> wrote in message
news:(E-Mail Removed)...
> If i already have a tree view created, and want to add another new node to
> it, how would i do so? Is there a way to throught tags or anything? like i
> have this
>
> RootNode
> |
> +-- Child 1
> +-- Child 2
>
> and i want to add a child node to child 1 how would i refrence it and add
a
> new one to it after the list was already made? thanks (each node is
getting
> a name and a tag during the initial creation)
>
>