Treeview - select Item before rightclick -> contextmenu

L

LinusHechinger

i've got a treeview and a contextmenu opening
for it.
But got the problme, whe suing rightclick
there's a item selecte, thats not "under" the cursor,
so my options performed with the selectet
item in the contextmenu work with another item....

How to change the selected item befor contextmenu opens
to the one which is -under- the cursor ????
 
A

Armin Zingler

LinusHechinger said:
i've got a treeview and a contextmenu opening
for it.
But got the problme, whe suing rightclick
there's a item selecte, thats not "under" the cursor,
so my options performed with the selectet
item in the contextmenu work with another item....

How to change the selected item befor contextmenu opens
to the one which is -under- the cursor ????

See my reply in microsoft.public.dotnet.framework.windowsforms.

(It is:
"Handle the MouseDown event. Select the item under the mouse
if the right button has been pressed. Call the TVW's GetNodeAt
method to determine the node to be selected.")
 

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

Top