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).
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)
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()
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!