Show/Hide on panels causes GUI glitches(?)

Frank Aune Frank.Aune at broadpark.no
Fri Nov 23 03:55:45 PST 2007


Hello,

I usually use xrc to design my gui, and in this particular instance I have two 
child panels attached to the main frame. The bottom panel is hidden by 
default, while the top panel is shown by default. When a user clicks a button 
in the top panel, the top panel is hidden and the bottom panel is shown 
instead.

The problem:

While the hiding of the top panel works fine, it seems its still not "gone" 
eg. it still takes up screen estate, because the bottom panel is drawn under 
the top panel still. I have to send a frame.SendSizeEvent() to get it to draw 
correctly.

While this works, I can for a split second still see the widgets drawn at the 
bottom before the SendSizeEvent() is issued and the frame is redrawn 
correctly.

Not a huge problem I guess, but still annoying. I've tried Freezing() and 
Thawing() the frame, and it didn't help. So basically I'm looking for 
solutions on how to accomplish the above without experiencing these GUI 
glitches.

Thanks for any input.
-Frank




More information about the wxpython-users mailing list