Search code examples
pythonwxpythonright-clickwxwidgetspopupmenu

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?


Solution

  • 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