]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxSingleChoiceDialog.py
2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
6 def runTest(frame
, nb
, log
):
7 dlg
= wxSingleChoiceDialog(frame
, 'Test Single Choice', 'The Caption',
8 ['zero', 'one', 'two', 'three', 'four', 'five',
9 'six', 'seven', 'eight'], wxCHOICEDLG_STYLE
)
10 if dlg
.ShowModal() == wxID_OK
:
11 log
.WriteText('You selected: %s\n' % dlg
.GetStringSelection())
14 #---------------------------------------------------------------------------
20 This class represents a dialog that shows a list of strings, and allows the user
21 to select one. Double-clicking on a list item is equivalent to single-clicking
28 if __name__
== '__main__':
31 run
.main(['', os
.path
.basename(sys
.argv
[0])])