[wxPython] sizer removal question

I'm trying to remove all the panels from a wxBoxSizer so I can fill it with different ones, but I must not
understand how the Remove method is supposed to work:

...
            while true == sizer.Remove(0):
                print 'removed a pane'
                pass
...

I can see the panels when they are first added, but when the above code is run, I don't see the
'removed a pane' message (and yes, print output from elsewhere is visible).

TIA,
Shi.

···

--
Shi Sherebrin
Research Programmer
Imaging Labs, Robarts Research Institute
phone:(519)685-8500 x34097 email:shi@imaging.robarts.ca

Shi Sherebrin wrote:
> I'm trying to remove all the panels from a wxBoxSizer so I can fill
> it with different ones, but I must not understand how the Remove
> method is supposed to work:

Why not just create a new sizer? When you call window.SetSizer(newSizer, true) it will dispose of the old one for you.

···

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