wx MenuItem - icon is missing

Discussion in 'Python' started by Laszlo Nagy, Jul 5, 2011.

  1. Laszlo Nagy

    Laszlo Nagy Guest

    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
    Laszlo Nagy, Jul 5, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miro Durcik

    app.rc resource's icon to .net Icon

    Miro Durcik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,391
    Miro Durcik
    Oct 9, 2004
  2. =?Utf-8?B?QmVybmll?=

    Missing New Web Project icon in Visual InterDev 6

    =?Utf-8?B?QmVybmll?=, Feb 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    336
    =?Utf-8?B?QmVybmll?=
    Feb 26, 2004
  3. Dan Polansky
    Replies:
    3
    Views:
    801
    Larry Barowski
    Feb 12, 2007
  4. Philip Semanchuk

    Re: wx MenuItem - icon is missing

    Philip Semanchuk, Jul 6, 2011, in forum: Python
    Replies:
    1
    Views:
    332
    Gregory Ewing
    Jul 7, 2011
  5. Bodi
    Replies:
    1
    Views:
    281
    Lasse Reichstein Nielsen
    Nov 18, 2003
Loading...

Share This Page