| The treeview control is a very undocumented control which is provided with Visual Basic in the Windows Common Controls pack 2. This code opens a few doors which should help you out. Make a new project. To the form add a treeview control and a list box. Code: Add this code to the form's Load procedure: Private Sub Form_Load() 'Declare Variables Dim mNode As Node Dim i As Integer 'Populate the list box List1.AddItem "Node 1" List1.AddItem "Node 2" List1.AddItem "Node 3" 'Add the primary node Set mNode = Treeview1.Nodes.Add() mNode.text = "Primary Node" Add the nodes from the list box For i = 0 To List1.ListCount -1 Set mNode = Treeview1.Nodes.Add(1, tvwChild) mNode.Text = List1.List(i) Next i End Sub |
Basic TreeView |
Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design