Board index » cppbuilder » differentiate between right click and left (popup menu)

differentiate between right click and left (popup menu)

I have placed a popup menu on a canvas. The left button paints on the
canvas, but I want the right button to activate a popup menu. When I click
the right mouse button it just paints. How to I seperate the actions?
Thanks
ADam.
 

Re:differentiate between right click and left (popup menu)


Hi,

in  your OnMouseDown and OnMouseUp events
put

if (Button != 0) return;

So, if you pressed right mousee button, you will leave your drawing routine
and popup menu will appear.

Hope this helps,
Sinisa
http://www.sigmapi-design.com

Quote
Adam Versteegen wrote:
> I have placed a popup menu on a canvas. The left button paints on the
> canvas, but I want the right button to activate a popup menu. When I click
> the right mouse button it just paints. How to I seperate the actions?
> Thanks
> ADam.

Other Threads