c# - How can i find selected node of treeview when click right button -
I am working on the Windows project and using C #. I want to capture tree view selected node which I right click and click on it.
I am writing tvlocation. Selected Node Index
But this only returns the root index of the node.
Thank you for your help ...
If you are looking at To recognize that the node was clicked, then handle the nodemouseclick event, as follows:
Private Zero Tree View 1_NodemouseClick (Object Sender, Tree NodeMouseClickEventErgages E) {if (e. Button == MouseButtons.Right) {MessageBox.Show (string.Format ("node clicked: {0}", e.Node.Text)); }}
You can select the program here node, if you also need it.
Comments
Post a Comment