Tree control under Visual Basic

  • Thread starter Thread starter Gerardo
  • Start date Start date
G

Gerardo

Hello everybody, could anyone paste me a snippet, or part of the code
for working with trees, it's a control I need to figure out how to use
it. Thanks

Gerardo
 
Concentrate on the Nodes property.

You create and add nodes and each node can have nodes.

Then you use recursion to traverse it.

HTH,
Shane
 
a little code...
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load

Dim n As New TreeNode("Shane")

tvw.Nodes.Add(n)

n.Nodes.Add("Bob")

End Sub
 
SStory said:
a little code...
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load

Dim n As New TreeNode("Shane")

tvw.Nodes.Add(n)

n.Nodes.Add("Bob")

End Sub

Hey man thank you a lot, that's what I was looking for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

A Tree 5
Tree View 1
Tree List View 9
Filling a Treeview 1
Decision trees 1
How to use WINDOWS FIREWALL API? 2
Tree list view control for .NET 2.0 1
Tree View 1

Back
Top