1
2
3
4
5
6
7
8
9
|
Private Sub Form_Load()
'// add some items
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"
'// make sure Child1 of Child1 is visible
TreeView1.Nodes("child1_child1").EnsureVisible
End Sub
|