Hi All,
I am using wxStaticBitmap, to load three images by condition
I want the image(s) background to be TRANSPARENT in the wxStaticBitmap.
So, I used wxMaskColour to filter background color of the bitmaps.
Everything works for the first bitmap I used in wxStaticBitmap. But other
two bitmaps are not
displaying at all after using wxStaticBitmap::SetBitmap.
here is my code
self.bmpoff = wxBitmap("off.bmp",wxBITMAP_TYPE_BMP)
self.bmpon1 = wxBitmap("on1.bmp",wxBITMAP_TYPE_BMP)
self.bmpon2 = wxBitmap("on2.bmp",wxBITMAP_TYPE_BMP)
x = wxMaskColour(self.bmpon1,wxWHITE)
y = wxMaskColour(self.bmpon2,wxWHITE)
z = wxMaskColour(self.bmpoff,wxWHITE)
self.bmpon1.SetMask(x)
self.bmpon2.SetMask(y)
self.bmpoff.SetMask(z)
self.ind = wxStaticBitmap(self,-1,self.bmpoff)
.... OnTest(self):
if self.counter%10 == 0:
self.ind.SetBitmap(self.bmpon1)
else:
self.ind.SetBitmap(self.bmpon2)
self.counter += 1
All those bitmaps are WHITE background color
What am I doing wrong?
Thanks
Anbu