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