]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-02/toolbar.py
6 class ToolbarFrame(wx
.Frame
):
8 def __init__(self
, parent
, id):
9 wx
.Frame
.__init
__(self
, parent
, id, 'Toolbars',
11 panel
= wx
.Panel(self
)
12 panel
.SetBackgroundColour('White')
13 statusBar
= self
.CreateStatusBar()
14 toolbar
= self
.CreateToolBar()
15 toolbar
.AddSimpleTool(wx
.NewId(), images
.getNewBitmap(),
16 "New", "Long help for 'New'")
18 menuBar
= wx
.MenuBar()
20 menuBar
.Append(menu1
, "&File")
22 menu2
.Append(wx
.NewId(), "&Copy", "Copy in status bar")
23 menu2
.Append(wx
.NewId(), "C&ut", "")
24 menu2
.Append(wx
.NewId(), "Paste", "")
25 menu2
.AppendSeparator()
26 menu2
.Append(wx
.NewId(), "&Options...", "Display Options")
27 menuBar
.Append(menu2
, "&Edit")
28 self
.SetMenuBar(menuBar
)
30 def OnCloseMe(self
, event
):
33 def OnCloseWindow(self
, event
):
36 if __name__
== '__main__':
37 app
= wx
.PySimpleApp()
38 frame
= ToolbarFrame(parent
=None, id=-1)