]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/SingleChoiceDialog.py
Give BitmapButton its own demo, get rid of ErrorDialogs
[wxWidgets.git] / wxPython / demo / SingleChoiceDialog.py
CommitLineData
cf694132 1
8fa876ca 2import wx
cf694132
RD
3
4#---------------------------------------------------------------------------
5
6def 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
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.
cf694132 27
8fa876ca
RD
28As with all dialogs, be sure to retrieve the information you need BEFORE you
29destroy the dialog.
1fded56b 30"""
cf694132
RD
31
32
33
1fded56b
RD
34if __name__ == '__main__':
35 import sys,os
36 import run
8eca4fef 37 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
493f1553 38