I’m trying to add a
menu to the system’s menu.
The application is written
with PythonCard.
In the on_initialize of the
background class I do:
def on_initialize(self,
event):
. . .
sm =
win32gui.GetSystemMenu(self.GetHandle(), 0)
id = wx.NewId()
win32gui.InsertMenu(sm,
5, win32con.MF_BYPOSITION | win32con.MF_STRING | win32con.MF_UNCHECKED, id, “MyStuff”)
self.Bind(wx.EVT_MENU,
self.onMyStuff, id=id)
. . .
When I look at the system
menu, I can see my new menu item but I don’t get the event when I click
on it.
If I replace the self.Bind .
. . with
self.Bind(wx.EVT_MENU_HIGHLIGHT,
self.onMyStuff, id=id)
Then it works, I can see
that I get the event when the mouse passes over the menu item in the system’menu
So why is EVT_MENU not sending
the event?
I hope someone can help.
Jean-Pierre Eusgter