wxTextCtrl flicker

63q2o4i02 at sneakemail.com 63q2o4i02 at sneakemail.com
Wed Sep 6 10:18:47 PDT 2006


Hi, I'm trying to update a wxTextCtrl really fast and am trying to get
rid of flicker.  It's a table of about 30 numbers and text and
sometimes other things (random enough not to want to use any grid
thing), not something that needs to scroll.  I've tried the following
to reduce flicker:

1.  Use RICH text option (helped a LOT)
2.  Buffer text into one wxString and then write the whole thing at
once instead of writing each line at a time (helped)
3.  Tried eliminating the Clear() call before writing, but that
inserted the text at the end, rather than replacing what's there.
4.  Tried Replace()ing text so didn't have to Clear() it before
writing/inserting it.  Didn't help as the text seemed to be selected
immediately before being replaced, which caused Great Flicker.
5.  Captured the EVT_ERASE_BACKGROUND event and did nothing.  No help.

So I'm wondering if there is a way to get the text not to update as
soon as you do something (eg Clear() or << or whatever), but instead
buffers up the changes and then print them at once?  IE, how do you do
double-buffering or memoryDC type stuff with a text control?  I've
looked around but all the DC stuff talks about graphics, not text.

thanks
ms







More information about the wx-users mailing list