OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: jmaeding on July 15, 2012, 02:22:37 PM

Title: doing a context menu on right click of a control
Post by: jmaeding on July 15, 2012, 02:22:37 PM
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
Title: Re: doing a context menu on right click of a control
Post by: owenwengerd on July 15, 2012, 03:30:36 PM
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 (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Function/GetMouseCoords.htm) to get the mouse position.
Title: Re: doing a context menu on right click of a control
Post by: jmaeding on July 16, 2012, 08:19:07 AM
oh, never saw that before.
That would also be useful in detecting what content was clicked within the control. thx
Title: Re: doing a context menu on right click of a control
Post by: Fred Tomke on July 24, 2012, 08:25:46 PM
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