It works fine for me in the PopupMenu sample in the demo using 2.9.4, try upgrading. IIRC the menu has to go into owner-drawn mode on Windows when an icon is used, and in 2.8 and prior it was using some simple drawing code in wx to emulate the native look of the menu, which worked fine in XP and earlier. Now I think it is using theme APIs to do the drawing so it should match the native look, as long as themes are enabled.
···
On 11/28/12 11:51 PM, Thierry Brizzi wrote:
Hi Robin,
Yes, you're right. I'm working on Windows 7 with wxPython 2.8.12.1
(unicode) for Python 2.7.
Is this a known bug ? Has It been corrected in earlier versions of
wxPython ?
Ok, I’ll have a look to this version. Thanks for all.
···
Le vendredi 30 novembre 2012 19:34:32 UTC+1, Robin Dunn a écrit :
On 11/28/12 11:51 PM, Thierry Brizzi wrote:
Hi Robin,
Yes, you’re right. I’m working on Windows 7 with wxPython 2.8.12.1
(unicode) for Python 2.7.
Is this a known bug ? Has It been corrected in earlier versions of
wxPython ?
It works fine for me in the PopupMenu sample in the demo using 2.9.4,
try upgrading. IIRC the menu has to go into owner-drawn mode on Windows
when an icon is used, and in 2.8 and prior it was using some simple
drawing code in wx to emulate the native look of the menu, which worked
fine in XP and earlier. Now I think it is using theme APIs to do the
drawing so it should match the native look, as long as themes are enabled.
Another solution is to use wx.lib.agw.flatmenu module. Moreover, It doesn’t require a 2.9 release.
···
Le mardi 4 décembre 2012 08:47:22 UTC+1, Thierry Brizzi a écrit :
Ok, I’ll have a look to this version. Thanks for all.
Le vendredi 30 novembre 2012 19:34:32 UTC+1, Robin Dunn a écrit :
On 11/28/12 11:51 PM, Thierry Brizzi wrote:
Hi Robin,
Yes, you’re right. I’m working on Windows 7 with wxPython 2.8.12.1
(unicode) for Python 2.7.
Is this a known bug ? Has It been corrected in earlier versions of
wxPython ?
It works fine for me in the PopupMenu sample in the demo using 2.9.4,
try upgrading. IIRC the menu has to go into owner-drawn mode on Windows
when an icon is used, and in 2.8 and prior it was using some simple
drawing code in wx to emulate the native look of the menu, which worked
fine in XP and earlier. Now I think it is using theme APIs to do the
drawing so it should match the native look, as long as themes are enabled.
You might try running the small menu example code that was posted a few minutes ago; it is a tiny sample code that uses a bitmap, and you can see if it has the same problem. For what it’s worth, when I run this on my system (Windows 7, wx 2.9.1.1), it does not have the problem that you have a picture of above.
The topic is “Windows: is there a way to force a menu width to be updated?”
···
On Wednesday, November 28, 2012 5:33:06 AM UTC-5, Thierry Brizzi wrote:
Hi all,
I’d like to create a popup menu having items with the following background :
But when I define a bitmap for an item with method “SetBitmap” the popup menu and item background styles completely change :