Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8827 > unrolled thread
| Started by | Philip Semanchuk <philip@semanchuk.com> |
|---|---|
| First post | 2011-07-05 08:50 -0400 |
| Last post | 2011-07-05 08:50 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: wx MenuItem - icon is missing Philip Semanchuk <philip@semanchuk.com> - 2011-07-05 08:50 -0400
| From | Philip Semanchuk <philip@semanchuk.com> |
|---|---|
| Date | 2011-07-05 08:50 -0400 |
| Subject | Re: wx MenuItem - icon is missing |
| Message-ID | <mailman.628.1309875146.1164.python-list@python.org> |
On Jul 5, 2011, at 4:02 AM, Laszlo Nagy wrote: > 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' Hi Laszlo, Two suggestions -- 1. Post a complete example that demonstrates the problem so that we don't have to dummy up a wx app ourselves to try your code. 2. Ask on the wxPython mailing list. Good luck Philip
Back to top | Article view | comp.lang.python
csiph-web