I'm having problems with wxBitmapButton as discussed in this post to the wxPython-users list yesterday. Robin indicates that this is a known problem on the Mac. I wonder if someone here can confirm this and possibly point out a workaround? What confuses me is that the wxBitmapButton example in the wxPython Demo works fine (PNG image encoded with img2py).
Any help is much appreciated.
Cheers, Darran.
-------- Original Message -------- Subject: Re: [wxPython-users] arghh, colour wxBitmapButton problem ... Date: Fri, 28 Jan 2005 11:31:03 -0800 From: Robin Dunn <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] References: <[EMAIL PROTECTED]>
Darran Edmundson wrote:
I've been trying desperately for the last few hours to get a colour wxBitmapButton working. It seems so simple:
but my buttons thus created don't appear properly. I've put a screen capture of a test app on:
http://anusf.anu.edu.au/~dee900/Projects/wxPython/
along with two of the source images. I've tried converting the source images in Photoshop to 8-bit PNG, index-colour, etc., all to no avail.
Looking at the wxPython wxBitmapButton demo, the authors use hardcoded XPM images rather than loading from
Actually they are PNG images that have been encoded into a Python source file using the img2py tool included with wxPython.
a file via one of the wx image loaders. Surely one can load from a file though, no?
Yes. The problem you are running into is a known problem with BitmapButtons on wxMac. I don't know the details but it is something to do with which native format that is being used to give the image to the native control. If you put the same image in wx.StaticBitmap then you'll see that it is being loaded okay.
-- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Darran Edmundson ([EMAIL PROTECTED]) ANU Supercomputer Facility Vizlab Australian National University, Canberra, ACT 2600 tel: +61 2 6125-0517 fax: +61 2 6125-5088 _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig