title: Align ListBox in Frame wxpython
body: <p>I'm trying to figure out how to align a ListBox properly. As soon as i insert the lines of ListBox, the layout transforms into a mess.</p>
  <pre><code>#!/usr/bin/python
  # -*- coding: utf-8 -*-
  import wx
  
  oplist=[]
  with open(&quot;options.txt&quot;,&quot;r&quot;) as f:
      for line in f:
          oplist.append(line.rstrip('\n'))
  print(oplist)
  
  class Example(wx.Frame):
  
      def __init__(self, parent, title):
          super(Example, self).__init__(parent, title = title, size=(200,300))
  
          self.InitUI()
          self.Centre()
          self.Show()
  
      def InitUI(self):
          p = wx.Panel(self)
          vbox= wx.BoxSizer(wx.VERTICAL)
          self.l1 = wx.StaticText(p, label=&quot;Enter number&quot;, style=wx.ALIGN_CENTRE)
          vbox.Add(self.l1, -1, wx.ALIGN_CENTER_HORIZONTAL, 200)
          self.b1 = wx.Button(p, label=&quot;Buton 1&quot;)
          vbox.Add(self.b1, -1, wx.ALIGN_CENTER_HORIZONTAL,100)
          self.flistbox= wx.ListBox(self,choices=oplist, size=(100,100), name=&quot;Field&quot;, wx.ALIGN_CENTER_HORIZONTAL)
          vbox.Add(self.flistbox, -1, wx.CENTER, 10)
          p.SetSizer(vbox)
          
  app = wx.App()
  Example(None, title=&quot;BoxSizer&quot;)
  app.MainLoop()
  </code></pre>
  <p>Here the outputs with and without:
  <a href="https://i.stack.imgur.com/52j71.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/52j71.png" alt="With ListBox" /></a>
  <a href="https://i.stack.imgur.com/15VkA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/15VkA.png" alt="Without" /></a></p>