the left-click menu

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
number4
Earned a small fee
Earned a small fee
Posts: 17
Joined: Wed Mar 09, 2005 6:12 pm

the left-click menu

Post by number4 »

On windows there is a menu in most applications that comes up wherver your mouse is on a left click. I generally know how to detect the click and how to make a menu but I am unclear on how to do this exactly. It should be different options depeding on what frame is clicked on and whats in the frame etc.
I do see the one that appears with a txtcntrl.
eco
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 203
Joined: Tue Aug 31, 2004 7:06 pm
Location: Behind a can of Mountain Dew
Contact:

Post by eco »

I'm sure you mean Right-Click menu (called a context menu or popup menu). Basically all you have to do is capture right click mouse events for each from you want a context menu for. You then create your wxMenu in that event handler just like any other menu then call wxWindow::PopupMenu() to make it appear.
number4
Earned a small fee
Earned a small fee
Posts: 17
Joined: Wed Mar 09, 2005 6:12 pm

Post by number4 »

Thank you.
How did I end up thinking left click.
Post Reply