-
Notifications
You must be signed in to change notification settings - Fork 21
/
RadioBox.py
executable file
·45 lines (32 loc) · 1.07 KB
/
RadioBox.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
import wx
class DemoFrame(wx.Frame):
""" This window displays a button """
def __init__(self, title="Micro App"):
wx.Frame.__init__(self, None, -1, title)
MenuBar = wx.MenuBar()
FileMenu = wx.Menu()
item = wx.MenuItem(FileMenu, wx.ID_EXIT, "&Quit")
FileMenu.Append(item)
self.Bind(wx.EVT_MENU, self.OnQuit, item)
MenuBar.Append(FileMenu, "&File")
self.SetMenuBar(MenuBar)
panel = wx.Panel(self, -1)
RB = wx.RadioBox(
self,
label="Hedges",
choices=[
"ABOUT", "AROUND", "ABOVE", "POSITIVE", "BELOW", "VICINITY",
"GENERALLY", "CLOSE", "NOT", "SOMEWHAT", "VERY", "EXTREMELY",
"SLIGHTLY", "AFTER", "BEFORE"
],
majorDimension=2,
style=wx.RA_SPECIFY_COLS)
self.Bind(wx.EVT_CLOSE, self.OnQuit)
def OnQuit(self, Event):
self.Destroy()
if __name__ == '__main__':
app = wx.App(False)
frame = DemoFrame()
frame.Show()
app.MainLoop()