Checkable items in popup menus
Suzuki Alex
Alex.Suzuki at ksta.ktzh.ch
Wed Nov 29 02:18:12 PST 2006
Hi everyone,
I am popping up a wx.Menu containing checkable items (added by calling
AppendCheckItem) using wx.Window.PopupMenu(). I create the menu once
and popup the same instance later. My problem is that checkable items
are not automatically checked/unchecked when I click them.
I tried adding a checkable item to the menu bar of my application, and
there it works fine.
Does anyone have an idea what might cause this?
Thanks in advance,
Alex
The code looks like this:
-->--
menu = wx.Menu("DHCP")
# create some submenus
menu.AppendSeparator()
# boolean options
menu.AppendCheckItem(wx.NewId(), "Testlauf")
item = menu.AppendCheckItem(wx.NewId(), "Verbose")
item.Check()
self.menuDhcp = menu
...
def BtnDhcpOnPress(self, event):
self.PopupMenu(self.menuDhcp)
--<--
More information about the wxpython-users
mailing list