]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/SingleChoiceDialog.py
1 # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
8 #---------------------------------------------------------------------------
10 def runTest(frame
, nb
, log
):
11 dlg
= wx
.SingleChoiceDialog(
12 frame
, 'Test Single Choice', 'The Caption',
13 ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'],
17 if dlg
.ShowModal() == wx
.ID_OK
:
18 log
.WriteText('You selected: %s\n' % dlg
.GetStringSelection())
22 #---------------------------------------------------------------------------
28 This class represents a dialog that shows a list of strings, and allows the user
29 to select one. Double-clicking on a list item is equivalent to single-clicking
32 As with all dialogs, be sure to retrieve the information you need BEFORE you
38 if __name__
== '__main__':
41 run
.main(['', os
.path
.basename(sys
.argv
[0])])