mirror of
https://github.com/bendtherules/pytry.git
synced 2026-08-18 13:53:01 +00:00
All the previous files
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import wx
|
||||
class MenuExample(wx.Frame):
|
||||
def __init__(self, parent, id, title):
|
||||
wx.Frame.__init__(self, parent, id, title, size=(250, 150))
|
||||
menubar = wx.MenuBar()
|
||||
file = wx.Menu()
|
||||
quit = wx.MenuItem(file, 1, 'Qu&it\tCtrl+q \tCtrl+t')
|
||||
#quit.SetBitmap(wx.Bitmap('icons/exit.png'))
|
||||
file.AppendItem(quit)
|
||||
self.Bind(wx.EVT_MENU, self.OnQuit, id=1)
|
||||
menubar.Append(file, '&File')
|
||||
self.SetMenuBar(menubar)
|
||||
self.Centre()
|
||||
self.Show(True)
|
||||
def OnQuit(self, event):
|
||||
self.Close()
|
||||
app = wx.App()
|
||||
MenuExample(None, -1, '')
|
||||
app.MainLoop()
|
||||
Reference in New Issue
Block a user