Small demo improvement

Hi All,

    I find the wx.SearchCtrl in the demo very useful. However, every
time I type a character in it, the wx.TreeCtrl gets recreated and
flickers like mad. Adding a simple:

self.tree.Freeze()
# rest of code
self.tree.Thaw()

In the RecreateTree method solves the problem and it is much nicer (in
my opinion, obviously).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

Hi Andrea,

What version of wxPython are you using?
I remember something about Freeze() and Thaw() becoming empty methods… although I might be remembering it wrong :o)

Peter.

···

On 1/26/07, Andrea Gavana andrea.gavana@gmail.com wrote:

Hi All,

I find the wx.SearchCtrl in the demo very useful. However, every

time I type a character in it, the wx.TreeCtrl gets recreated and
flickers like mad. Adding a simple:

self.tree.Freeze()

rest of code

self.tree.Thaw()

In the RecreateTree method solves the problem and it is much nicer (in
my opinion, obviously).

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”

http://xoomer.virgilio.it/infinity77/


To unsubscribe, e-mail:
wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


There is NO FATE, we are the creators.

Hi Peter,

Hi Andrea,

What version of wxPython are you using?
I remember something about Freeze() and Thaw() becoming empty methods...
although I might be remembering it wrong :o)

Uhm, as far as I know they are not empty methods... I have never seen
empty methods behave so well when needed (i.e., repopulating a
wx.TreeCtrl/wx.ListCtrl and the like) or so bad when you call Thaw()
without calling Freeze():

wx._core.PyAssertionError: C++ assertion "m_frozenness > 0" failed at ..\..\src\
msw\window.cpp(1499) in wxWindow::Thaw(): Thaw() without matching Freeze()

:smiley:

I am using wxPython 2.8.1.1 on XP.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 1/26/07, Peter Damoc <pdamoc@gmail.com> wrote:

Peter Damoc wrote:

Hi Andrea,

What version of wxPython are you using?
I remember something about Freeze() and Thaw() becoming empty methods... although I might be remembering it wrong :o)

You're probably thinking of wx.DC.BeginDrawing and EndDrawing.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!