I am trying to get my wxPerl app to not flicker (or at least not flicker
noticibly) when I resize the frame. However, I've looked through the
documentation and haven't found a good way of doing this. I wasn't sure if
this was a symptom of all WX programs, or just mine so I ran a few others.
I ran wxGlade (it's written in python, not perl, but I needed something for
comparison) and found that it also flickers a lot when I resize boxes. I
also ran the wxPerl demo program (don't know where I got it) and it flickers
as well. I am using wxPerl v0.18 on Window2000. Is this flickering on
resize something that I can eliminate or reduce, or is it something I just
have to live with when writing wxPerl programs? Is getting rid of it
something as simple as a call to a particular method in the frame class, or
would I have to write a lot of custom code and do a bunch of tricks and
hacks? Anyone have any ideas?
> resize something that I can eliminate or reduce, or is it something I just
> have to live with when writing wxPerl programs? Is getting rid of it
> something as simple as a call to a particular method in the frame class, or
> would I have to write a lot of custom code and do a bunch of tricks and
> hacks? Anyone have any ideas?
Sounds to me like you need to increase your monitors refresh rate.
What version of wxwindows/wxwidgets are you using?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
On Tue, 31 Aug 2004 14:41:31 -0700, Brent Villalobos
> I am trying to get my wxPerl app to not flicker (or at least not flicker
> noticibly) when I resize the frame.
I've put a considerable amount of work into this for one of my
programs recently. I would suggest that you start by looking at the
documentation for the window styles wxNO_FULL_REPAINT_ON_RESIZE,
wxCLIP_CHILDREN, and wxCLIP_SIBLINGS. Using those ubiquitously can do
a lot for you.
The following may also prove useful:
(wx-users list archive of a thread where I try to fix up some flicker
http://wiki.wxwidgets.org/wiki.pl?Flicker-Free_Drawing (wxWidgets Wiki
page on flicker reduction)
One of the more drastic techniques mentioned in the Wiki page is
manual clipping. I ended up deciding that the amount of flicker left
after I'd done everything else I could was tolerable and not worth
doing lots of custom DC work.
If the information above doesn't reduce your flicker to acceptable
levels, then providing which widgets are flickering and the general
layout of your window will probably help finding the source of
flicker. For me, the two big sources of flicker were StaticText
(fixable) and Notebook (mostly un-fixable) controls.