Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
during runtime i want to know which treeview node is clicked so that i could work with the node that the user specified ?

What I have tried:

i have created various nodes but don't know how to work with the user specific node .
Posted
Updated 19-Jan-21 23:44pm

The information is returned in the EventArgs parameters as described in the documentation: TreeView Class (System.Windows.Forms) | Microsoft Docs[^].
 
Share this answer
 
Sir the code is perfect but why should I write so much of code only one line will give me what I want the line is : treeview1.nodes[i-1].name="Xyz";
 
Share this answer
 
Comments
Richard Deeming 20-Jan-21 12:29pm    
If you want to reply to a solution, click the "Have a Question or Comment?" button under the solution and post a comment.

Do not post your comment as a new "solution".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900