Treeview Controls in VB

Microsoft Windows vista home premium w/s...
April 10, 2011 at 19:28:18
Specs: Windows 7
Im having trouble understanding how to add a child node under a parent.

I use this to add a node at root level no problem

 Function CreateNode(ByVal Index As String, ByVal Caption As String)
        Dim addnode As New TreeNode()
        addnode.Name = Index
        addnode.Text = Caption
    End Function

however all the code i have seen that shows me how to add a child uses this

Dim nodX As Node

When i put this into MVS2005 i get "type node not defined" im assuming have to define it. but how ?

See More: Treeview Controls in VB

Report •

April 10, 2011 at 19:55:06
Okay i have found that the code is somewhat different.

Is anyone able to tell me how to add a child under a parent on the fly.

Report •

April 11, 2011 at 02:16:24
Add the new node to the parent node, not the TreeView itself.

How To Ask Questions The Smart Way

Report •

Related Solutions

Ask Question