[wxPython-users] GridBagSizer error with a hidden item
Lee Merrill
webbily1 at nc.rr.com
Mon Sep 4 12:11:10 PDT 2006
> ... but not repainted, is there another call to repaint the window?
Ooh, found it, a call to Root.Refresh() repaints the window. Revised snippet
follows, quite simple!
Lee
def showCtrl(ctrl, show=True):
if show:
ctrl.Show()
else:
ctrl.Hide()
while ctrl:
if not ctrl in ctrlList:
ctrlList.append(ctrl)
ctrl = ctrl.GetParent()
ctrlList = []
# Code that shows and hides controls by calling showCtrl()
for ctrl in ctrlList:
ctrl.Layout()
Root.Layout()
Root.Refresh()
More information about the wxpython-users
mailing list