context sample? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
gpu
Experienced Solver
Experienced Solver
Posts: 92
Joined: Tue Aug 12, 2014 3:46 am

context sample?

Post by gpu » Thu Sep 04, 2014 1:41 pm

where is the example shows that when right click, then show a pop up context panel, thank u

User avatar
doublemax
Moderator
Moderator
Posts: 15651
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: context sample?

Post by doublemax » Thu Sep 04, 2014 3:17 pm

Catch the rightclick mouse event, in the event handler create a wxMenu on the stack and call wxWindow::PopupMenu() or wxWindow::GetPopupMenuSelectionFromUser().

Check the "menu" sample.
Use the source, Luke!

gpu
Experienced Solver
Experienced Solver
Posts: 92
Joined: Tue Aug 12, 2014 3:46 am

Re: context sample?

Post by gpu » Fri Sep 05, 2014 9:26 am

I saw on the menu sample, there is an altertive that use EVT_CONTEXT_MENU...is it better to use this? I now use EVT_RIGHT_UP.

User avatar
doublemax
Moderator
Moderator
Posts: 15651
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: context sample?

Post by doublemax » Fri Sep 05, 2014 9:33 am

gpu wrote:I saw on the menu sample, there is an altertive that use EVT_CONTEXT_MENU...is it better to use this? I now use EVT_RIGHT_UP.
Yes, i forgot about that. This is the preferred way.
Use the source, Luke!

Post Reply