import wx import wx.lib.agw.genericmessagedialog as GMD class MainFrame(wx.Frame): def __init__(self, parent): super(MainFrame, self).__init__(parent) self.button1 = wx.Button(self, label="Nyit") self.button1.Bind(wx.EVT_BUTTON, self.on_click_button1) self.button2 = wx.Button(self, label="Másik") main_box = wx.BoxSizer(wx.VERTICAL) main_box.Add(self.button2) main_box.Add(self.button1) self.SetSizer(main_box) def on_click_button1(self, event): dlg = GMD.GenericMessageDialog(self, 'Üzenet', 'Teszt', agwStyle=wx.ICON_INFORMATION | wx.OK) dlg.ShowModal() class ValamiApp(wx.App): def OnInit(self): frame = MainFrame(None) frame.Show() return True app=ValamiApp() app.MainLoop()