Is this code called many times to add different objects, if yes then
maybe add the Freeze/Thaw to the caller of the method, i.e.
Freeze
add all objects
Thaw
Werner
but I still see the flicker in Windows. I'm attaching a copy of my code just so you can see what I've done.
I played a bit with it and I see the flicker too, as it has to do with sorting I wonder if OLV is doing the sorting delayed from the actual adding, so I tried this.
wx.CallLater(50, self.fileOlv.Thaw)
That was enough to remove the flicker when I add 40 to 50 files.
The flicker is removed for the first 50ms during which the GUI hangs and does not update as each object is being added.
I would like the ListView to update as each object is being added without the flicker.
In my app there’s some additional processing on each file, so it takes about 1/5 second between each object being added to the ListView.
Unfortunately using wx.CallLater does not resolve the issue but I appreciate the suggestion.
···
On Thursday, February 27, 2014 5:49:18 AM UTC-5, werner wrote:
Hi,
On 27/02/2014 10:29, RedHotChiliPepper wrote:
Hi Werner -
I did as you said
Freeze
add all objects
Thaw
but I still see the flicker in Windows. I’m attaching a copy of my
code just so you can see what I’ve done.
I played a bit with it and I see the flicker too, as it has to do with
sorting I wonder if OLV is doing the sorting delayed from the actual
adding, so I tried this.
wx.CallLater(50, self.fileOlv.Thaw)
That was enough to remove the flicker when I add 40 to 50 files.
The flicker is removed for the first 50ms during which the GUI hangs and does not update as each object is being added.
I would like the ListView to update as each object is being added without the flicker.
In my app there's some additional processing on each file, so it takes about 1/5 second between each object being added to the ListView.
Unfortunately using wx.CallLater does not resolve the issue but I appreciate the suggestion.
These things are only always a work around at best and I don't like them.
Maybe it is time to take a step back and try to isolate if the problem is OLV or the under lying listctrl and then try to solve it where it really happens.