Hi evryone! This is a very strange behaviour, it happens using
wxPython 2.6.1 or upper but not with 2.6.0 or lower. Try it yourself:
import wx
app=wx.App(redirect=False)
f=wx.Frame(None)
f.Show()
f.Freeze()
b=wx.Button(f)
f.Thaw()
app.MainLoop()
On my system (W!nXP unicode) I get this:
Traceback (most recent call last):
File "freeze.py", line 9, in <module>
f.Thaw()
File "c:\Programmi\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
line 9664, in Thaw
return _core_.Window_Thaw(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "m_frozenness > 0" failed at
..\..\src\msw\window.cpp(1547) in wxWindow::Thaw(): Thaw() without
matching Freeze()
This is the note at the end of 2.6.1 recent changes:
"""
wxMSW: If freezing a top-level window wxWidgets will actually freeze
the TLW's children instead. This works around a feature of MS Windows
that allowed windows beneath the frozen one in Z-order to paint
through, and also mouse events clicking through to the lower window.
"""
So, if a TLW gets a new children _while_it_is_frozen_ it gets Thaw()'d
incorrectly imho.
Can you confirm this? Is it a bug??
Thanks in advance
Marco