Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import wx
- class Window(wx.Frame):
- def __init__(self, parent, title):
- wx.Frame.__init__(self, parent, title = title, size = (300,250))
- self.control = wx.TextCtrl(self, style = wx.TE_MULTILINE)
- self.Show(True)
- menu = wx.Menu()
- aboutItem = menu.Append(wx.ID_ABOUT,"About","Push the button to get an information about this application")
- exitItem = menu.Append(wx.ID_EXIT,"Exit","Push the button to leave this application")
- bar = wx.MenuBar()
- bar.Append(menu,"File")
- self.SetMenuBar(bar)
- self.Bind(wx.EVT_MENU, self.OnAbout, aboutItem)
- def OnAbout(self, e):
- dlg = wx.MessageDialog(self, "This is a mini editor keeping your text","About pyNote", wx.OK)
- dlg.ShowModal()
- app = wx.App()
- wnd = Window(None, "pyNote")
- app.MainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement