[wxPython-users] static bitmap won't allow me to change the color

Christopher Barker Chris.Barker at noaa.gov
Thu Jan 25 22:46:15 PST 2007


Richard Harding wrote:

> Can anyone see why the ChangeStatus method will no longer change the 
> bitmap color from Red to Green? 

You need to call self.status_light_icon.SetBitmap(self.status_light) 
after changing the bitmap. You also probably need to call dc.Clear() 
after changing the background color.

I'd probably just make both a Red and Green bitmap on __init__, and 
store them, then OnStatusChange can just call SetBitmap() with the one 
you want.


-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception




More information about the wxpython-users mailing list