wx MenuItem - icon is missing

Laszlo Nagy gandalf at shopzeus.com
Wed Jul 6 08:25:37 CEST 2011

>> Under windows, this displays the icon for the popup menu item. Under GTK it doesn't and there is no error message, no exception.
> I get different results than you.
> Under Ubuntu 9.04 w with wx, when I right click I see a menu item called test with little icon of a calculator or something.
> Under OS X 10.6 with wx and Win XP with wx, when I right click I get this --
> Traceback (most recent call last):
>    File "x.py", line 46, in onPopupMenu
>      item = wx.MenuItem(None,-1,u"Test")
>    File "/usr/local/lib/wxPython-unicode-", line 11481, in __init__
>      _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs))
> wx._core.PyAssertionError: C++ assertion "parentMenu != NULL" failed at /BUILD/wxPython-src- in wxMenuItemBase(): menuitem should have a menu
I guess I'll have to write to the wxPython mailing list. Seriously, 
adding a simple menu to something is supposed to be platform 
independent, but we got four different results on four systems. :-(

Thank you for trying out though.

More information about the Python-list mailing list