]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-10/sub_menu.py
3 class MyFrame(wx
.Frame
):
5 wx
.Frame
.__init
__(self
, None, -1,
11 submenu
.Append(-1, "Sub-item 1")
12 submenu
.Append(-1, "Sub-item 2")
13 menu
.AppendMenu(-1, "Sub-menu", submenu
)
15 menu
.AppendSeparator()
16 exit
= menu
.Append(-1, "Exit")
17 self
.Bind(wx
.EVT_MENU
, self
.OnExit
, exit
)
19 menuBar
= wx
.MenuBar()
20 menuBar
.Append(menu
, "Menu")
21 self
.SetMenuBar(menuBar
)
24 def OnExit(self
, event
):
28 if __name__
== "__main__":
29 app
= wx
.PySimpleApp()