]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/SingleChoiceDialog.py
better __docfilter__ and other epydoc tweaks
[wxWidgets.git] / wxPython / demo / SingleChoiceDialog.py
... / ...
CommitLineData
1
2import wx
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
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:
14 log.WriteText('You selected: %s\n' % dlg.GetStringSelection())
15
16 dlg.Destroy()
17
18#---------------------------------------------------------------------------
19
20
21
22
23overview = """\
24This class represents a dialog that shows a list of strings, and allows the user
25to select one. Double-clicking on a list item is equivalent to single-clicking
26and then pressing OK.
27
28As with all dialogs, be sure to retrieve the information you need BEFORE you
29destroy the dialog.
30"""
31
32
33
34if __name__ == '__main__':
35 import sys,os
36 import run
37 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
38