removing a sizer from a sizer

sorry for the duplicate post – the last post didn’t
have a title

it seems when I remove a sizer from a sizer, it gets
destroyed… how can I avoid this? I want to remove sizerB from
sizerA and add it to sizerC.

I have some code that does a bunch of auto population of UI,
but I want to do some minor customizations of very specific pieces of UI after
the auto population, and most of that involves removing sizers from other
sizers, and putting them into different sizers.

Hamish,

sorry for the duplicate post – the last post didn’t have a title

it seems when I remove a sizer from a sizer, it gets destroyed... how can I avoid this? I want to remove sizerB from sizerA and add it to sizerC.

I have some code that does a bunch of auto population of UI, but I want to do some minor customizations of very specific pieces of UI after the auto population, and most of that involves removing sizers from other sizers, and putting them into different sizers.

Oops...I replied to the other one. Here's my original reply:

1) If you want to ask a new question, then do not reply to an old one...it gets confusing when you do that.
2) You are probably looking for sizer.Detach(). Try something like:

sizerA.Detach(sizerB)
sizerC.Insert(sizerB)

Theoretically, this should work See the docs for more info: wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

HTH

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org