VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



An Example of TreeView to Create Parent/Child Nodes with Images

by M. Adeel Ahmad [ TNC ] (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 28th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

An Example of TreeView to Create Parent/Child Nodes with Images

Rate An Example of TreeView to Create Parent/Child Nodes with Images



'Place TreeView and ImageControl on the Form
'Add 2 Images in the Imaglist

Private Sub Form_Load()
TreeView1.ImageList = ImageList1
For k = 1 To 10
    TreeView1.Nodes.Add , , "PKey" + Str(k), "Parent Node" + Str(k), 1, 2
Next
For j = 1 To 10
For k = TreeView1.Nodes.Count To TreeView1.Nodes.Count + 10
    TreeView1.Nodes.Add "PKey" + Str(j), tvwChild, "Ckey" + Str(k), "Child Node" + Str(k), 1, 2
Next
Next
End Sub

Private Sub TreeView1_BeforeLabelEdit(Cancel As Integer)

End Sub


Download this snippet    Add to My Saved Code

An Example of TreeView to Create Parent/Child Nodes with Images Comments

No comments have been posted about An Example of TreeView to Create Parent/Child Nodes with Images. Why not be the first to post a comment about An Example of TreeView to Create Parent/Child Nodes with Images.

Post your comment

Subject:
Message:
0/1000 characters