doing a context menu on right click of a control

Started by jmaeding, July 15, 2012, 02:22:37 PM

Previous topic - Next topic

jmaeding

I saw some posts on things close to this, but I never understood a couple things:
1) on a right click, how do I get the coords of the cursor so i can show a modal dialog with choices?
2) would that work at all, showing a modal dialog in the middle of the event callback like that?

Anyone tried this?
thanks

owenwengerd

I think it would work, but I've never done that myself. You could use a MouseUp event handler to trigger the context menu display, then you get the mouse position via event handler arguments. You could also call GetMouseCoords to get the mouse position.
Owen Wengerd (Outside The Box) / ManuSoft

jmaeding

oh, never saw that before.
That would also be useful in detecting what content was clicked within the control. thx

Fred Tomke

Hi, I've read that you saw some posts. But maybe you've missed the FAQ about context menu. There should be a sample. If you've already seen it - forget my answer.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]