]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxSingleChoiceDialog.py
Updated the description of wx.PopupTransientWindow
[wxWidgets.git] / wxPython / demo / wxSingleChoiceDialog.py
1 # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2 #
3 # o Updated for wx namespace
4 #
5
6 import wx
7
8 #---------------------------------------------------------------------------
9
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'],
14 wx.CHOICEDLG_STYLE
15 )
16
17 if dlg.ShowModal() == wx.ID_OK:
18 log.WriteText('You selected: %s\n' % dlg.GetStringSelection())
19
20 dlg.Destroy()
21
22 #---------------------------------------------------------------------------
23
24
25
26
27 overview = """\
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
30 and then pressing OK.
31
32 As with all dialogs, be sure to retrieve the information you need BEFORE you
33 destroy the dialog.
34 """
35
36
37
38 if __name__ == '__main__':
39 import sys,os
40 import run
41 run.main(['', os.path.basename(sys.argv[0])])
42