[wxPython] maskcolor not working in 2.2.2

Hi,

I recently upgraded to 2.2.2 from 2.1.15. I've got through a few
bugs/differences but the last one I can't figure out is why my icons aren't
masked anymore. They are displaying the ugly bright green borders I gave them
as a mask color.

# Here is my original code that worked in 2.1.15
bmp = wxBitmap('bitmaps/prio.bmp', wxBITMAP_TYPE_BMP)
bmp.SetMask( wxMaskColour(bmp, wxColour(0,255,0)) )
self.prioicon = self.imglist.Add(bmp)

# Here is the code I lifted straight outta the demo, which works
# in the demo, but not in my app!
self.bmp_withcolourmask = wxBitmap('bitmaps/prio.bmp', wxBITMAP_TYPE_BMP)
mask = wxMaskColour(self.bmp_withcolourmask, wxColour(0,255,0))
self.bmp_withcolourmask.SetMask(mask)
self.prioicon = self.imglist.Add(self.bmp_withcolourmask)

Anyone have an idea what might have gone wrong between releases?

Thanks,
Mike

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

Hello Mike,

Monday, November 06, 2000, 9:37:46 PM, you wrote:

Hi,

I recently upgraded to 2.2.2 from 2.1.15. I've got through a few
bugs/differences but the last one I can't figure out is why my icons aren't
masked anymore. They are displaying the ugly bright green borders I gave them
as a mask color.

# Here is my original code that worked in 2.1.15
bmp = wxBitmap('bitmaps/prio.bmp', wxBITMAP_TYPE_BMP)
bmp.SetMask( wxMaskColour(bmp, wxColour(0,255,0)) )
self.prioicon = self.imglist.Add(bmp)

# Here is the code I lifted straight outta the demo, which works
# in the demo, but not in my app!
self.bmp_withcolourmask = wxBitmap('bitmaps/prio.bmp', wxBITMAP_TYPE_BMP)
mask = wxMaskColour(self.bmp_withcolourmask, wxColour(0,255,0))
self.bmp_withcolourmask.SetMask(mask)
self.prioicon = self.imglist.Add(self.bmp_withcolourmask)

Anyone have an idea what might have gone wrong between releases?

There was something about keeping reference to bitmap.

···

--
regards,
Niki

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users