while adding items to a wxListCtrl in background (triggered by OnIdle),
I'm suffering from screen flicker of that control. I know, it's only
cosmetic, but my trails to avoid them failed so far.
This is on wxPython 2.3.2.1/wxGTK 2.3.2:
First I experimented with some styles:
wxCLIP_CHILDREN and wxNO_FULL_REPAINT_ON_RESIZE on constructor.
I just noticed this morning a note in the documentation for wxNotebook that
the wxCLIP_CHILDREN style might reduce flicker (presumably used for the
notebook itself?)... are you using this style flag on all the parents of
your ListCtrl? Perhaps all the way up to the managed window?
Just my 5e-13 cents worth...
Chris
···
-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama>
-------------------------------------------------------------------------
----- Original Message -----
From: "Hans-Peter Jansen" <hpj@urpla.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Saturday, February 16, 2002 11:18 PM
Subject: [wxPython] Howto avoid flicker when adding items to a wxListCtrl
Hi wxPythonistas,
while adding items to a wxListCtrl in background (triggered by OnIdle),
I'm suffering from screen flicker of that control. I know, it's only
cosmetic, but my trails to avoid them failed so far.
This is on wxPython 2.3.2.1/wxGTK 2.3.2:
First I experimented with some styles:
wxCLIP_CHILDREN and wxNO_FULL_REPAINT_ON_RESIZE on constructor.
Have you tried using mylist.Freeze()/mylist.Thaw() before and after the
update?
I had a lot of luck with this, except with the col headings under
win32. I have a resizeCol method in my derived class that fits the
columns to fill the whole list width. Under linux when I called Freeze
it stopped redrawing the col headings as well as the contents. Under
Win32 it only stopped the contents from being drawn.
myers
···
On Sat, 2002-02-16 at 08:18, Hans-Peter Jansen wrote:
Hi wxPythonistas,
while adding items to a wxListCtrl in background (triggered by OnIdle),
I'm suffering from screen flicker of that control. I know, it's only
cosmetic, but my trails to avoid them failed so far.
This is on wxPython 2.3.2.1/wxGTK 2.3.2:
First I experimented with some styles:
wxCLIP_CHILDREN and wxNO_FULL_REPAINT_ON_RESIZE on constructor.
I just noticed this morning a note in the documentation for wxNotebook that
the wxCLIP_CHILDREN style might reduce flicker (presumably used for the
notebook itself?)... are you using this style flag on all the parents of
your ListCtrl? Perhaps all the way up to the managed window?
Nice idea. Just tried, but flicker effect persists
Just my 5e-13 cents worth...
Thanks, nevertheless.
Cheers,
Hans-Peter
···
On Monday, 18. February 2002 08:39, Chris Fama wrote:
Chris
-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama>
-------------------------------------------------------------------------
----- Original Message -----
From: "Hans-Peter Jansen" <hpj@urpla.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Saturday, February 16, 2002 11:18 PM
Subject: [wxPython] Howto avoid flicker when adding items to a wxListCtrl
> Hi wxPythonistas,
>
> while adding items to a wxListCtrl in background (triggered by OnIdle),
> I'm suffering from screen flicker of that control. I know, it's only
> cosmetic, but my trails to avoid them failed so far.
>
> This is on wxPython 2.3.2.1/wxGTK 2.3.2:
>
> First I experimented with some styles:
> wxCLIP_CHILDREN and wxNO_FULL_REPAINT_ON_RESIZE on constructor.
>
> No effect.
>
> Then I tried to suppress background painting with
>
> EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
>
> and:
>
> def OnEraseBackground(self, event):
> pass
>
> It's called only one time, and again: no visible change.
>
> Any more ideas?
>
> Cheers,
> Hans-Peter
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwindows.org
> http://lists.wxwindows.org/mailman/listinfo/wxpython-users
while adding items to a wxListCtrl in background (triggered by OnIdle),
I'm suffering from screen flicker of that control. I know, it's only
cosmetic, but my trails to avoid them failed so far.
Try list.Freeze() and list.Thaw().
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!