Removing items from wx.BoxSizer doesn't work

Hi together,
I'm currently facing a really weird issue regarding the wx BoxSizer.
The issue is that I'm creating 3 gauges in a sizer. After execution of
some code these gauges should get removed from the sizer.
Unfortunately this doesn't happen. I made a code snippet and uploaded
it here http://codeviewer.org/view/code:1f0c

Note:
  - After removing the items from the sizer self.Sizer.GetChildren()
returns a empty list
  - Removing the items from bottom to top (as first indice 2, then 1,
then 0) doesn't work at all. Removing items from top to bottom works
partly (unless the last item).

It would be awesome if someone of you have a clue how to solve this
issue !

This was actually solved on the wxPython IRC channel several hours ago. Attached is one of the fixed versions that we came up with. This is for posterity’s sake.

pyMe_fixed.py (1.12 KB)

···

Mike Driscoll

Blog: http://blog.pythonlibrary.org