]>
Commit | Line | Data |
---|---|---|
cf694132 RD |
1 | |
2 | from wxPython.wx import * | |
3 | ||
4 | #--------------------------------------------------------------------------- | |
5 | ||
6 | def runTest(frame, nb, log): | |
7 | dlg = wxSingleChoiceDialog(frame, 'Test Single Choice', 'The Caption', | |
8 | ['zero', 'one', 'two', 'three', 'four', 'five', | |
8c14bc91 | 9 | 'six', 'seven', 'eight'], wxDEFAULT_DIALOG_STYLE|wxOK|wxCANCEL) |
cf694132 RD |
10 | if dlg.ShowModal() == wxID_OK: |
11 | log.WriteText('You selected: %s\n' % dlg.GetStringSelection()) | |
12 | dlg.Destroy() | |
13 | ||
14 | #--------------------------------------------------------------------------- | |
15 | ||
16 | ||
17 | ||
18 | ||
1fded56b RD |
19 | overview = """\ |
20 | This class represents a dialog that shows a list of strings, and allows the user | |
21 | to select one. Double-clicking on a list item is equivalent to single-clicking | |
22 | and then pressing OK. | |
cf694132 | 23 | |
1fded56b | 24 | """ |
cf694132 RD |
25 | |
26 | ||
27 | ||
1fded56b RD |
28 | if __name__ == '__main__': |
29 | import sys,os | |
30 | import run | |
31 | run.main(['', os.path.basename(sys.argv[0])]) | |
493f1553 | 32 |