flickering in wxPython with bliting and memmoryDC

Tim Gahnström /Bladerman tim at bladerman.com
Wed Apr 16 16:16:03 EDT 2003


"Tim Gahnström /Bladerman" <tim at bladerman.com> wrote

> The panel is not large or anything and refreshes arent done at a
particular
> high speed, but it flickers everytime. Just like if the dc gets cleared
> before the blitting but I can't se that I do that.

Replying to myself here again... I just got the answer to my prayers from
comp.soft_sys.wxwindows and thougt that I could just as well put the info in
here to fill up the google archives in case somene else is experiencing the
same problem.

For some reason there is a wxEraseEvent issued every time the  panel is
repainted. This must be caught to avoid flickering.

Catch it with a callback to an empty function.

EVT_ERASE_BACKGROUND(fromPanel,useEmptyFunc)

Tim






More information about the Python-list mailing list