import wx class MainFrame(wx.Frame): def __init__(self, *args, **kwds): wx.Frame.__init__(self, *args, **kwds) self.init_frame() self.set_layout() def init_frame(self): #komponensek beállítása self.SetTitle("Program01") self.Centre() def set_layout(self): #layout main_box = wx.BoxSizer(wx.VERTICAL) self.SetSizer(main_box) self.Layout() class SimpleApp(wx.App): def OnInit(self): self.frame = MainFrame(None, wx.ID_ANY, "") self.SetTopWindow(self.frame) self.frame.Show() return True if __name__ == "__main__": app = SimpleApp(0) app.MainLoop()