]>
Commit | Line | Data |
---|---|---|
cf694132 | 1 | |
8fa876ca | 2 | import wx |
cf694132 RD |
3 | |
4 | #--------------------------------------------------------------------------- | |
5 | ||
6 | def runTest(frame, nb, log): | |
8fa876ca RD |
7 | dlg = wx.SingleChoiceDialog( |
8 | frame, 'Test Single Choice', 'The Caption', | |
9 | ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'], | |
10 | wx.CHOICEDLG_STYLE | |
11 | ) | |
12 | ||
13 | if dlg.ShowModal() == wx.ID_OK: | |
cf694132 | 14 | log.WriteText('You selected: %s\n' % dlg.GetStringSelection()) |
8fa876ca | 15 | |
cf694132 RD |
16 | dlg.Destroy() |
17 | ||
18 | #--------------------------------------------------------------------------- | |
19 | ||
20 | ||
21 | ||
22 | ||
1fded56b RD |
23 | overview = """\ |
24 | This class represents a dialog that shows a list of strings, and allows the user | |
25 | to select one. Double-clicking on a list item is equivalent to single-clicking | |
26 | and then pressing OK. | |
cf694132 | 27 | |
8fa876ca RD |
28 | As with all dialogs, be sure to retrieve the information you need BEFORE you |
29 | destroy the dialog. | |
1fded56b | 30 | """ |
cf694132 RD |
31 | |
32 | ||
33 | ||
1fded56b RD |
34 | if __name__ == '__main__': |
35 | import sys,os | |
36 | import run | |
8eca4fef | 37 | run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) |
493f1553 | 38 |