code: def _do_layout(self):
          
  
          sizer_dialog = wx.FlexGridSizer(3, 1, 0, 0)
  
          # Sub sizers
          sizer_buttons = wx.FlexGridSizer(1, 3, 5, 5)
  
          # Adding buttons to sizer_buttons
          for button in [self.button_cancel, self.button_apply, self.button_ok]:
              sizer_buttons.Add(button, 0, wx.ALL | wx.EXPAND, 5)
  
          sizer_buttons.AddGrowableRow(0)
          for col in xrange(3):
              sizer_buttons.AddGrowableCol(col)
  
          # Adding main components
          sizer_dialog.Add(self.csvwidgets.sizer_csvoptions,
                           0, wx.ALL | wx.EXPAND, 5)
          sizer_dialog.Add(self.preview_textctrl,  1, wx.ALL | wx.EXPAND, 0)
          sizer_dialog.Add(sizer_buttons,  0, wx.ALL | wx.EXPAND, 5)
  
          self.SetSizer(sizer_dialog)
  
          sizer_dialog.AddGrowableRow(1)
          sizer_dialog.AddGrowableCol(0)
  
          self.Layout()
          self.Centre()
docs: Set sizers