Question Help needed with TreeView Control

a5m0d1

Member
Joined
Mar 14, 2010
Messages
15
Programming Experience
1-3
I have a simple problem to resolve but I can’t find the answer no matter how hard I
look. I hope someone out there can help as I’m running out of walls to bang my head against.

Okay new windows form with a textbox, button and TreeView
Populate the TreeView.nodes with the default nodes via properties

I have:
Node1
-----Node2
-----Node3
-----Node4
Node5
-----Node6
-----Nodes7

I want to click button1 and have the name of the childnode “Node3” placed in the textbox. Not via selection, I can do that. But via index or item number.


The code I have is as follows

Textbox1.text = Treeview1.nodes.item(0).name
That will display Node1 in the textbox but I need it to show me child items.
 
Back
Top