code: def _do_layout(self):
          
  
          dialog_main_sizer = wx.BoxSizer(wx.HORIZONTAL)
          upper_sizer = wx.BoxSizer(wx.HORIZONTAL)
          lower_sizer = wx.FlexGridSizer(2, 1, 5, 0)
          lower_sizer.AddGrowableRow(0)
          lower_sizer.AddGrowableCol(0)
          button_sizer = wx.BoxSizer(wx.HORIZONTAL)
  
          upper_sizer.Add(self.codetext_ctrl, 1, wx.EXPAND, 0)
          lower_sizer.Add(self.result_ctrl, 1, wx.EXPAND, 0)
          lower_sizer.Add(button_sizer, 1, wx.EXPAND, 0)
          button_sizer.Add(self.apply_button, 1, wx.EXPAND, 0)
  
          self.upper_panel.SetSizer(upper_sizer)
          self.lower_panel.SetSizer(lower_sizer)
          sash_50 = int(round((config["window_size"][1] - 100) * 0.5))
  
          self.splitter.SplitHorizontally(self.upper_panel,
                                          self.lower_panel, sash_50)
          dialog_main_sizer.Add(self.splitter, 1, wx.EXPAND, 0)
          self.SetSizer(dialog_main_sizer)
          self.Layout()
docs: Layout sizers