def doLayout(self): parentsizer = wx.BoxSizer(wx.VERTICAL) childsizer = wx.BoxSizer(wx.VERTICAL) btn1 = wx.Button (self, wx.NewId(), "Button 1") btn2 = wx.Button (self, wx.NewId(), "Button 2") childsizer.Add (btn1) childsizer.Add (btn2) parentsizer.Add (childsizer, flag = wx.ALIGN_RIGHT) self.SetSizer(parentsizer) self.Layout()