[I'm resending this because I'm afraid it didn't get through the first time]
···
---------- Forwarded message ----------
From: Frank Niessink <frank@niessink.com>
Date: 24 nov. 2007 23:03
Subject: wx.MenuItem.SetBitmaps() not working for checkable menu items?
To: wxPython-users@lists.wxwidgets.org
Hi,
I'm trying to set the bitmaps of a checkable menu item using
menuItem.SetBitmaps(bitmap1, bitmap2) but it doesn't work for me on
Windows Vista/Python 2.5.1/wxPython 2.8.6.1. "Does not work" means the
bitmaps don't show up, but I get an old style check mark instead. In
addition, the menu text is shifted more to the left than items without
bitmaps. BTW, the other checkable menu items in the same menu get old
style check marks as well.
I added just one line to the menu demo (lines 72-78) to set the
bitmaps for the checkable menu item:
menu4 = wx.Menu()
# Check menu items
item = menu4.Append(401, "letters", "abcde...", wx.ITEM_CHECK)
item.SetBitmaps(images.getSmilesBitmap(), images.getTest2Bitmap()) <-
inserted line
menu4.Append(402, "digits", "123...", wx.ITEM_CHECK)
menu4.Append(403, "letters and digits", "abcd... + 123...", wx.ITEM_CHECK)
menuBar.Append(menu4, "Chec&k")
Also see attached screenshot.
Cheers, Frank