-
I never used a treeview
OK as you can read and see i have never used a treeview. I got this far:
Code:
Private Sub Form_Load()
VBtv.ImageList = ImageList1
VBtv.Nodes.Add , , , "VB Listing", ImageList1.ListImages(1).Key
End Sub
Private Sub VBtv_Click()
MsgBox VBtv.SelectedItem.Text
End Sub
but how do i add a node in the first not like a child node ? and how would i know whats selected ? I i select the first child node how do i know ?
-
ok i got it
Code:
Private Sub Form_Load()
VBtv.ImageList = ImageList1
VBtv.Nodes.Add , , , "VB Listing " & i, ImageList1.ListImages(1).Key
VBtv.Nodes.Add 1, tvwChild, , "VB Listing " & i, ImageList1.ListImages(1).Key
End Sub
Private Sub VBtv_Click()
MsgBox VBtv.SelectedItem.Index & ". " & VBtv.SelectedItem.Text
End Sub
-
Also if you do a forum search for Treeview you'll find many examples of how it is used.