]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-10/toggle_items.py
3 class MyFrame(wx
.Frame
):
5 wx
.Frame
.__init
__(self
, None, -1,
6 "Toggle Items Example")
10 exit
= menu
.Append(-1, "Exit")
11 self
.Bind(wx
.EVT_MENU
, self
.OnExit
, exit
)
12 menuBar
.Append(menu
, "Menu")
15 menu
.AppendCheckItem(-1, "Check Item 1")
16 menu
.AppendCheckItem(-1, "Check Item 2")
17 menu
.AppendCheckItem(-1, "Check Item 3")
18 menu
.AppendSeparator()
19 menu
.AppendRadioItem(-1, "Radio Item 1")
20 menu
.AppendRadioItem(-1, "Radio Item 2")
21 menu
.AppendRadioItem(-1, "Radio Item 3")
22 menuBar
.Append(menu
, "Toggle Items")
24 self
.SetMenuBar(menuBar
)
26 def OnExit(self
, event
):
30 if __name__
== "__main__":
31 app
= wx
.PySimpleApp()