473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Tree control under Visual Basic

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
Nov 20 '05 #1
5 1170
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
"Gerardo" <et******@arnet.com.ar> wrote in message
news:Om*************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #2
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

"Gerardo" <et******@arnet.com.ar> wrote in message
news:Om*************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #3
SStory wrote:
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.
Nov 20 '05 #4
No prob.
It's a cool control... just takes a little different coding.
"Gerardo" <et******@arnet.com.ar> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
SStory wrote:
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.

Nov 20 '05 #5
No prob.
It's a cool control... just takes a little different coding.
"Gerardo" <et******@arnet.com.ar> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
SStory wrote:
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.

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Randy Birch | last post by:
Reposted as the original is reported as deleted from the server. re: MSComCtl Listview control cashes after installing VB6/VS6 SP6 I have been advised that this problem has been reproduced...
1
by: Adalbert | last post by:
First, I'm sorry for my english. Second, I've a little question: is some tree stucture like collections ArrayList or Queue to hold tree of same objects in .NET? Maybe I can use TreeView to that. I...
5
by: Siegfried Heintze | last post by:
Is it possible to use the new ASP.NET2 Tree control by only downloading and installing the new .NETFRAMEWORK v2? Or do you have to install visual studio and the lastest version of IIS? Anyone...
20
by: samean | last post by:
Hello, Could you explain me,In VB6 using control array,and how about VB.net. Thanks
1
by: Bobby | last post by:
Hello Tom and all, I am also doing almost similar kind of task. In my tree View, I am using 2 tree view from different access table which are almost similar. I want to drag and drop childs from...
5
by: Daniel | last post by:
I am trying to find all possible routes between two points on a tree using a top to bottom search only. The tree looks like this: ' 1 ' / \ ...
3
by: sagi | last post by:
Hi, I need to build a binary tree in Visual Basic 6.0 but I only find code in Visual Basic 2005 please help it's important Thanks :)
7
by: garyusenet | last post by:
I'm using krypton toolkit which has allowed me to make a cool looking form. However, when I set my textbox to disabled it is 'greyed' out. The grey colour isn't in keeping with the office 2007...
1
by: perspolis | last post by:
Hi all I'm looking for a Combobox that displays tree. Does anyone has a source code for that??? thanks in advance
1
by: Mel | last post by:
How do I put my tree view control inside a content place holder? I drag it there but it doesn't seem to appear in the correct spot. P.S - I have a master page with a content section representing...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.