def doLayout(self): sizer_vert = wx.BoxSizer(wx.VERTICAL) sizer_hor_1 = wx.BoxSizer(wx.HORIZONTAL) sizer_hor_2 = wx.BoxSizer(wx.HORIZONTAL) sizer_vert.Add (sizer_hor_1) sizer_vert.Add (sizer_hor_2) btn1 = wx.Button (self, wx.NewId(), "Button 1") btn2 = wx.Button (self, wx.NewId(), "Button 2") btn3 = wx.Button (self, wx.NewId(), "Button 3") btn4 = wx.Button (self, wx.NewId(), "Button 4") sizer_hor_1.Add (btn1) sizer_hor_1.Add (btn2) sizer_hor_2.Add (btn3) sizer_hor_2.Add (btn4) self.SetSizer(sizer_vert) self.Layout()