Visual Basic Treeview
I am using treeview in Visual Basic
I am trying to determine the code to reference a child of a child of a child.
I have not been able to find a code example.
Thank you.
Web Development
I am using treeview in Visual Basic
I am trying to determine the code to reference a child of a child of a child.
I have not been able to find a code example.
Thank you.
This may help:
(remove any spaces from URL)
by hurdk
Excellent answer.
Private Sub Form_Load()
' Add items to treeview
TreeView1.Nodes.Add , , "root", "Root Item"
TreeView1.Nodes.Add "root", tvwChild, "child1_root", "Child1 of Root"
TreeView1.Nodes.Add "root", tvwChild, "child2_root", "Child2 of Root"
TreeView1.Nodes.Add "child1_root", tvwChild, "child1_child1", "Child1 of Child1"
TreeView1.Nodes.Add "child1_child1", tvwChild, "child1_child1_child1", "Child1 of Child1 of Child1"
TreeView1.Nodes("child1_child1").EnsureVisible
End Sub
by hurdk
This discussion is closed to new replies.
Sort by Trending