title: Cannot clear content of wxBoxSizer
body: <p>For some reason my <code>sizer.Clear()</code> does not seem to work properly.</p>
  
  <p>As far as I have understood from the docs it should work.</p>
  
  <p><strong>Am I doing something wrong that causes this behavior?</strong></p>
  
  <pre><code>import wx
  import os
  import sys
  import time
  import string
  import urllib2
  
  class MainWindow(wx.Frame):
    def __init__(self, parent, id=wx.ID_ANY, title="", pos=wx.DefaultPosition,
                 size=wx.DefaultSize, style=wx.MINIMIZE_BOX | wx.CLOSE_BOX | wx.RESIZE_BORDER | wx.SYSTEM_MENU | wx.CAPTION):
  
      wx.Frame.__init__(self, parent, id, title, pos, size, style)
      panel = wx.Panel(self)
      sizer = wx.BoxSizer(wx.VERTICAL)
      panel.SetSizer(sizer)
  
      self.sizer = sizer
      self.panel = panel
  
      self.ShowLoginBox()
  
  
  
    def ShowLoginBox(self):
      sizer = wx.FlexGridSizer(rows=4, cols=2, hgap=15, vgap=10)
      sizer.AddGrowableCol(1, 1)
  
      login_url = wx.TextCtrl(self.panel, 1, size=(150, -1))
      label_url = wx.StaticText(self.panel, -1, "URL:")
      sizer.Add(label_url, 0, wx.LEFT | wx.TOP| wx.RIGHT, 30)
      sizer.Add(login_url, 1, wx.EXPAND | wx.TOP | wx.RIGHT, 30)
  
      login_username = wx.TextCtrl(self.panel, 1, size=(150, -1))
      label_username = wx.StaticText(self.panel, -1, "Username:")
      sizer.Add(label_username, 0, wx.LEFT | wx.RIGHT, 30)
      sizer.Add(login_username, 1, wx.EXPAND | wx.RIGHT, 30)
  
      login_password = wx.TextCtrl(self.panel, 1, size=(150, -1), style=wx.TE_PASSWORD)
      label_password = wx.StaticText(self.panel, -1, "Password:")
      sizer.Add(label_password, 0, wx.LEFT | wx.RIGHT, 30)
      sizer.Add(login_password, 1, wx.EXPAND | wx.RIGHT, 30)
  
      btn_process = wx.Button(self.panel, -1, "&amp;Login")
      self.panel.Bind(wx.EVT_BUTTON, self.OnSubmit, btn_process)
      sizer.Add(btn_process, 0, wx.LEFT, 30)
  
      login_url.SetValue("http://example.com")
      login_username.SetValue("admin")
      login_password.SetValue("pass")
  
      self.login_url = login_url
      self.login_username = login_username
      self.login_password = login_password
  
      self.sizer.Clear()
      self.sizer.Add(sizer, 1, wx.EXPAND)
      self.SetSizeWH(330, 250)
      self.Center()
  
  
  
    def OnSubmit(self, event):
      user_url  = self.login_url.GetValue()
      user_name = self.login_username.GetValue()
      user_pass = self.login_password.GetValue()
  
      # login info is used to get a URL
      print user_url, user_name, user_pass
  
      # if 200 OK
      self.ShowNew()
  
  
  
    def ShowNew(self):
      sizer = wx.BoxSizer(wx.HORIZONTAL)
      content = wx.ListCtrl(self.panel, -1, size=(780, 400), style=wx.LC_REPORT | wx.LC_SINGLE_SEL | wx.LC_HRULES | wx.LC_VRULES)
      content.InsertColumn(0, 'URL', width=745)
      sizer.Add(content, 1, wx.EXPAND)
  
      # populate with data from URL
  
      self.SetSizeWH(800, 520)
      self.Center()
      self.sizer.Clear()
      self.sizer.Add(sizer)
  
  
  
  if __name__ == '__main__':
    home_path = os.path.dirname(os.path.realpath(__file__))
  
    app = wx.PySimpleApp()
    frame = MainWindow(None, title="Test", size=(800, 520))
    frame.SetBackgroundColour("#ffffff")
    frame.Show()
    app.MainLoop()
  </code></pre>