import wx class ValamiDialog(wx.Dialog): def __init__(self, parent, title): super(ValamiDialog, self).__init__(parent, title=title, size=(300, 400)) rootSizer = wx.BoxSizer(wx.VERTICAL) rootSizer.Add( wx.TextCtrl(self, -1, "Szöveg", wx.DefaultPosition, wx.Size(100, 50), wx.TE_MULTILINE), 1, wx.EXPAND | wx.ALL, 10) button_sizer = wx.BoxSizer(wx.HORIZONTAL) button_sizer.Add( wx.Button(self, wx.ID_OK, "OK"), 0, wx.ALL, 10) button_sizer.Add( wx.Button(self, wx.ID_CANCEL, "Mégsem"), 0, wx.ALL, 10) rootSizer.Add( button_sizer, 0, wx.ALIGN_CENTER) self.SetSizerAndFit(rootSizer) class MainFrame(wx.Frame): def __init__(self, parent, title): super(MainFrame, self).__init__(parent, title=title) dialog = ValamiDialog(self, 'Felirat') dialog.Show() class SimpleApp(wx.App): def OnInit(self): frame = MainFrame(None, 'Párbeszéd') frame.Show() return True if __name__ == "__main__": app = SimpleApp() app.MainLoop()