]> git.saurik.com Git - wxWidgets.git/blame_incremental - utils/wxPython/demo/wxRadioBox.py
jconfig.h uses configures results
[wxWidgets.git] / utils / wxPython / demo / wxRadioBox.py
... / ...
CommitLineData
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6class TestRadioButtons(wxPanel):
7 def __init__(self, parent, log):
8 self.log = log
9 wxPanel.__init__(self, parent, -1)
10
11 sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
12 'six', 'seven', 'eight']
13
14 rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize,
15 sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
16 EVT_RADIOBOX(self, 30, self.EvtRadioBox)
17
18
19 def EvtRadioBox(self, event):
20 self.log.WriteText('EvtRadioBox: %d\n' % event.GetInt())
21
22#---------------------------------------------------------------------------
23
24def runTest(frame, nb, log):
25 win = TestRadioButtons(nb, log)
26 return win
27
28#---------------------------------------------------------------------------
29
30
31
32
33
34
35
36
37
38
39
40overview = """\
41A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labelled buttons.
42
43wxRadioBox()
44----------------------
45
46Default constructor.
47
48wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "radioBox")
49
50Constructor, creating and showing a radiobox.
51
52Parameters
53-------------------
54
55parent = Parent window. Must not be NULL.
56
57id = Window identifier. A value of -1 indicates a default value.
58
59label = Label for the static box surrounding the radio buttons.
60
61pos = Window position. If the position (-1, -1) is specified then a default position is chosen.
62
63size = Window size. If the default size (-1, -1) is specified then a default size is chosen.
64
65n = Number of choices with which to initialize the radiobox.
66
67choices = An array of choices with which to initialize the radiobox.
68
69majorDimension = Specifies the maximum number of rows (if style contains wxRA_SPECIFY_ROWS) or columns (if style contains wxRA_SPECIFY_COLS) for a two-dimensional radiobox.
70
71style = Window style. See wxRadioBox.
72
73validator = Window validator.
74
75name = Window name.
76"""