This is a 9 month old thread, but it seems the baby has not been
delivered yet, so I wanted to add my experience from this week:
It may be a bug in AUI/wxAUI and, if this is the case, I'll try to
hunt it down. However, my opinion is that Freeze and Thaw are still
broken on Windows.
The point of my email now is to report that Freeze/Thaw *is* working
for me on Windows (XP) but *not* working on Linux (Ubuntu).
Specifically, I am seeing the same classic "little square"--the same
one that Werner and others report in this thread--in the upper left
hand corner of the frame during the process of creating a matplotlib
graph and inserting it into an AUI notebook (the regular one, not
Andrea's, which I haven't yet switched to).
On Windows, I call Freeze() on the whole frame prior to the creation
of the graph and adding of the page to the notebook, and then Thaw()
and it the square aint there. But on Ubuntu Linux, it is, and I've
tried (I think) every trick I can, including using CallAfter(),
calling it on the parent of the notebook, the notebook itself, the
frame, etc. Every time, the little square.
My understanding of how Freeze and Thaw should work
is that, between the call to Freeze and the call to Thaw no drawing,
no painting, no visible layouting, no glitches, no nothing should be
visible in the client area of the window for which I have called
Freeze and Thaw.
That's my understanding, too, and certainly my wish. I feel a truly
totalitarian Freeze/Thaw (that as Andrea said, truly nothing is
changed visually) is such an important element of GUI programming if
you want things to look professional and non-buggy. Watching it put
show this small mangled-looking box in the corner for about 500 ms is
rather off-putting.
For some reason, the wx Trac site is not loading, but I checked
yesterday and this bug is still outstanding. On Trac it is reported
as being an MSW-only bug, but I'm clearly seeing it on Ubuntu Linux
and there is another post to this list about someone seeing it with
Xubuntu. I will try to amend that bug report to include GTK, then.
Also: Back in late April 2009, Robin suggested:
One way to work around that is to create the new windows
hidden, which I think is able to be done using 2-phase create like this:
p = wx\.PrePanel\(\)
p\.Hide\(\)
p\.Create\(parent, \.\.\.\)
Then do p.Show() later when you are ready to thaw everything.
This sounds promising, but I am having trouble figuring out how to do
it. I have a PlotPanel class that is a wx.Panel subclass to serve to
display a matplotlib canvas. I import this and use it within the
notebook. So if I want to use this wx.PrePanel approach with an
already made custom subclass, how would I do that? Would the idea be
that I make the PlotPanel class in the imported module actually a
PrePanel? (Haven't had a chance today to try it yet).
Thanks,
Che
···
On Tue, Apr 28, 2009 at 3:14 AM, Andrea Gavana wrote: