Newbie: Tree view help

C

clsmith66

Is there a click event for the tree view control or does any one know how to
create one?
 
M

Mohamed El Ashmawy

Did you try to use the SelectedIndexChange of the treeview control?
It has an argument: TreeViewSelectEventArgs which provides you with the
index newnode being selected. (e.newNode returns the index of the selected
node. You could use TreeView.GetNodeFromIndex(string index) to get a
reference of the seelcted node).

For example,
create the SelectedIndexChange for the treeview and add the following code
in it:
TreeNonde tn = TreeView1.GetNodeFromIndex(e.NewNode)
This line would return to you the node that was selected

Regards
Mohamed El Ashmawy
MEA Developer Support Center
ITWorx on behalf of Microsoft EMEA GTSC
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top