Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'assign': 0.04; 'ubuntu': 0.04; 'python:': 0.05; 'subject:missing': 0.07; 'amd64': 0.16; 'ubuntu.': 0.16; 'def': 0.16; 'thanks,': 0.17; "doesn't": 0.22; 'wrong?': 0.23; 'somewhere': 0.23; 'windows': 0.26; 'work.': 0.28; 'fine.': 0.29; 'menu,': 0.30; 'to:addr:python-list': 0.34; 'header :User-Agent:1': 0.34; 'skip:o 20': 0.36; 'doing': 0.37; 'but': 0.37; 'received:192': 0.38; 'menu': 0.38; 'showing': 0.38; 'received:192.168.1': 0.39; 'skip:s 20': 0.39; 'under': 0.39; 'to:addr:python.org': 0.39; 'did': 0.40; 'bitmap': 0.84; 'menu.': 0.84 Date: Tue, 05 Jul 2011 10:02:13 +0200 From: Laszlo Nagy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 MIME-Version: 1.0 To: python-list@python.org Subject: wx MenuItem - icon is missing Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1309854377 news.xs4all.nl 21830 [2001:888:2000:d::a6]:34029 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8816 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