简体   繁体   中英

Have a popupmenu appear on a popupmenu on right-click

I have a wx Popupmenu appear when I left-click on a toolbar LabelTool . I already have a binding to have a handler run when I left click an item in the menu, but I want another popup menu to appear when I right click an item in the original popup menu. I've already tried binding it to wx.EVT_RIGHT_DOWN but it doesn't do it. Whenever I try right clicking on a menu object, it seems it still calls the wx.EVT_MENU , which calls the same handler as a left-click would. How would I implement this?

As far as I can tell, that is not supported. Besides, no user is going to expect that they need to right click on a context menu anyway. You should rethink your design so it's more intuitive. Perhaps by using a sub-menu instead of a secondary popup menu

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM