]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-07/radio_box.py
don't use strlen() to verify the length of the string as it can contain embedded...
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-07 / radio_box.py
1 import wx
2
3 class RadioBoxFrame(wx.Frame):
4 def __init__(self):
5 wx.Frame.__init__(self, None, -1, 'Radio Box Example',
6 size=(350, 200))
7 panel = wx.Panel(self, -1)
8 sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
9 'six', 'seven', 'eight']
10 wx.RadioBox(panel, -1, "A Radio Box", (10, 10), wx.DefaultSize,
11 sampleList, 2, wx.RA_SPECIFY_COLS)
12
13 wx.RadioBox(panel, -1, "", (150, 10), wx.DefaultSize,
14 sampleList, 3, wx.RA_SPECIFY_COLS | wx.NO_BORDER)
15
16 if __name__ == '__main__':
17 app = wx.PySimpleApp()
18 RadioBoxFrame().Show()
19 app.MainLoop()