Skip to content

Commit a49c802

Browse files
Chris BarkerChris Barker
authored andcommitted
updated for Phoenix and modern code
1 parent e188668 commit a49c802

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

RadioBox.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,31 @@ def __init__(self, title = "Micro App"):
1111

1212
FileMenu = wx.Menu()
1313

14-
item = wx.MenuItem(FileMenu, wx.ID_ANY, "&Quit")
15-
FileMenu.AppendItem(item)
14+
item = wx.MenuItem(FileMenu, wx.ID_EXIT, "&Quit")
15+
FileMenu.Append(item)
1616
self.Bind(wx.EVT_MENU, self.OnQuit, item)
1717

1818
MenuBar.Append(FileMenu, "&File")
1919
self.SetMenuBar(MenuBar)
2020

2121

2222
RB = wx.RadioBox(self,
23-
-1,
24-
"Hedges",
25-
wx.DefaultPosition,
26-
wx.DefaultSize,
27-
["ABOUT", "AROUND", "ABOVE", "POSITIVE", "BELOW",
28-
"VICINITY", "GENERALLY", "CLOSE", "NOT", "SOMEWHAT", "VERY", "EXTREMELY",
29-
"SLIGHTLY", "AFTER", "BEFORE"],
30-
2,
31-
wx.RA_SPECIFY_COLS)
32-
33-
wx.EVT_CLOSE(self,self.OnQuit)
23+
label="Hedges",
24+
choices = ["ABOUT", "AROUND", "ABOVE", "POSITIVE",
25+
"BELOW", "VICINITY", "GENERALLY", "CLOSE",
26+
"NOT", "SOMEWHAT", "VERY", "EXTREMELY",
27+
"SLIGHTLY", "AFTER", "BEFORE"],
28+
majorDimension=2,
29+
style=wx.RA_SPECIFY_COLS)
30+
31+
self.Bind(wx.EVT_CLOSE, self.OnQuit)
3432

3533
self.Fit()
3634

3735
def OnQuit(self,Event):
3836
self.Destroy()
3937

40-
app = wx.PySimpleApp(0)
38+
app = wx.App(False)
4139
frame = DemoFrame()
4240
frame.Show()
4341
app.MainLoop()

0 commit comments

Comments
 (0)