[wxPython-users] GridBagSizer error with a hidden item
Lee Merrill
webbily1 at nc.rr.com
Sun Sep 3 17:08:48 PDT 2006
Well, I found out what I need to do after hiding or showing a control, I ca=
ll Layout on that control, then for that window and for every parent window=
, I call Layout on the window's sizer and containing sizer, and that seems =
to work. Snippet follows...
Just FYI,
Lee
szrList =3D []
def showCtrl(ctrl, show=3DTrue):
if show:
ctrl.Show()
else:
ctrl.Hide()
ctrl.Layout()
prevSzr =3D None
while ctrl:
szr =3D ctrl.GetContainingSizer()
if not szr:
break
if not szr in szrList:
szrList.append(szr)
szr =3D ctrl.GetSizer()
if szr and not szr in szrList:
szrList.append(szr)
ctrl =3D ctrl.GetParent()
prevSzr =3D szr
# Lots of hides / shows via showCtrl() above, and then...
for szr in szrList:
szr.Layout()
Root.Layout()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200609=
03/b0942355/attachment.htm
More information about the wxpython-users
mailing list