]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/demo/wxSingleChoiceDialog.py
jconfig.h uses configures results
[wxWidgets.git] / utils / wxPython / demo / wxSingleChoiceDialog.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
7 dlg = wxSingleChoiceDialog(frame, 'Test Single Choice', 'The Caption',
8 ['zero', 'one', 'two', 'three', 'four', 'five',
9 'six', 'seven', 'eight'])
10 if dlg.ShowModal() == wxID_OK:
11 log.WriteText('You selected: %s\n' % dlg.GetStringSelection())
12 dlg.Destroy()
13
14#---------------------------------------------------------------------------
15
16
17
18
19
20
21
22
23
24
25
26
27
28overview = """\
29This class represents a dialog that shows a list of strings, and allows the user to select one. Double-clicking on a list item is equivalent to single-clicking and then pressing OK.
30
31wxSingleChoiceDialog()
32---------------------------------------------
33
34wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, int n, const wxString* choices, char** clientData = NULL, long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
35
36Constructor, taking an array of wxString choices and optional client data.
37
38Parameters
39-------------------
40
41parent = Parent window.
42
43message = Message to show on the dialog.
44
45caption = The dialog caption.
46n = The number of choices.
47
48choices = An array of strings, or a string list, containing the choices.
49
50style = A dialog style (bitlist) containing flags chosen from the following:
51
52wxOK Show an OK button.
53
54wxCANCEL Show a Cancel button.
55
56wxCENTRE Centre the message. Not Windows.
57
58pos = Dialog position.
59"""