[wxPython-users] Deleting sizers
Robin Dunn
robin at alldunn.com
Thu Mar 1 10:21:10 PST 2007
Oswaldo Hernández wrote:
> Hello,
>
> I'm trying to remove a sizer. The sizer may contain another sizers,
> spacers and widgets.
> If i do: mainsizer.Remove(sizer), the sizer is deleted but the sizer
> childs persists.
>
> May I buid a recursive funcion to remove each item one by one?
As mentioned in the docs, the widgets managed by sizers are not
destroyed when the sizer is destroyed, because the widgets are owned by
their parents, not the sizers. On the other hand, child sizers are
destroyed when the parent sizer is.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list