[wxPython-users] Custom derived StatusBar refresh flickering
Robin Dunn
robin at alldunn.com
Fri Jan 4 13:23:25 PST 2008
CraigDouglas wrote:
> I have derived a status bar from wx.StatusBar shown below because I need to
> make my status bar flash a different colour under certain conditions. I
> periodically (every half a second) call the update() method from the main
> program. The bar keeps flickering every 4 to 10 seconds for some reason
> whether it is in a flashing state or not and I can't find a solution. I've
> tried wrapping Freeze and Thaw round the cal to update() but to no avail.
>
Refresh() doesn't actually do any drawing, it just requests that a paint
event be sent soon, so wrapping it in Freeze/Thaw won't help. Try
passing False to Refresh, that will cause it to not erase the widget
before painting it, and that is probably the cause of the flicker you
are seeing.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list