wxSizer.Remove(SubSizer) deletes SubSizer

Hi.

The documentation says that wxSizer.Remove() does not delete the window or sizer it is removing from the wxSizer, but when I remove a subSizer it is deleted and I get this error when I try to access it later :
wxPython wrapper for DELETED wxBoxSizer object! (The C++ object no longer exists.)

Is there away to not delete the subSizer when removing?

Thanks.

Jorge.

Jorge Hojyo wrote:

Hi.

The documentation says that wxSizer.Remove() does not delete the window or sizer it is removing from the wxSizer, but when I remove a subSizer it is deleted and I get this error when I try to access it later :
wxPython wrapper for DELETED wxBoxSizer object! (The C++ object no longer exists.)

Is there away to not delete the subSizer when removing?

Not currently. There have been some changes in 2.5 for this though.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!