I don't think wxWidgets/wxPython allows you to manipulate the system menu, with a few exceptions that are not sufficient for what you want:
You can remove the system menu by passing a style flag to the wx.Frame: style=wx.DEFAULT_FRAME_STYLE & ~wx.SYSTEM_MENU
On Mac OS X, menu items with ids such as wx.ID_EXIT
and wx.ID_HELP
are moved into the application menu.
I tried to bind the wx.EVT_MENU_OPEN
event and although the event handler is invoked, the passed event doesn't contain anything useful on Windows. The code below prints 'None 0' when I open the Frame's system menu:
import wx
class Frame(wx.Frame):
def __init__(self, *args, **kwargs):
super(Frame, self).__init__(*args, **kwargs)
self.Bind(wx.EVT_MENU_OPEN, self.onMenuOpen)
def onMenuOpen(self, event):
print event.GetMenu(), event.GetMenuId()
event.Skip()
app = wx.App(0)
frame = Frame(None)
frame.Show()
app.MainLoop()