Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8816 > unrolled thread

wx MenuItem - icon is missing

Started byLaszlo Nagy <gandalf@shopzeus.com>
First post2011-07-05 10:02 +0200
Last post2011-07-05 10:02 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  wx MenuItem - icon is missing Laszlo Nagy <gandalf@shopzeus.com> - 2011-07-05 10:02 +0200

#8816 — wx MenuItem - icon is missing

FromLaszlo Nagy <gandalf@shopzeus.com>
Date2011-07-05 10:02 +0200
Subjectwx MenuItem - icon is missing
Message-ID<mailman.624.1309854377.1164.python-list@python.org>
     def onPopupMenu(self,evt):
         menu = wx.Menu()
         for title,bitmap in self.getPopupMenuItems():
             item = wx.MenuItem(None,-1,title)
             if bitmap:
                 item.SetBitmap(bitmap)
             menu.AppendItem(item)
             menu.Bind(wx.EVT_MENU,self.onPopupMenuItemSelected,item)
         self.PopupMenu( menu, evt.GetPoint())
         menu.Destroy()

I have read somewhere that under GTK, I have to assign the bitmap before 
Append-ing the MenuItem to the Menu. So did I, but it doesn't work. Menu 
item icons are not showing up in Ubuntu. On Windows 7, everything is 
fine. What am I doing wrong?

System: Ubuntu 11 amd64
Python: 2.7.1+
wx.__version__ '2.8.11.0'

Thanks,

    Laszlo

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web