]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/TextEntryDialog.py
default style for statusbars varies by platform
[wxWidgets.git] / wxPython / demo / TextEntryDialog.py
... / ...
CommitLineData
1
2import wx
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
7 dlg = wx.TextEntryDialog(
8 frame, 'What is your favorite programming language?',
9 'Eh??', 'Python')
10
11 dlg.SetValue("Python is the best!")
12
13 if dlg.ShowModal() == wx.ID_OK:
14 log.WriteText('You entered: %s\n' % dlg.GetValue())
15
16 dlg.Destroy()
17
18
19#---------------------------------------------------------------------------
20
21
22
23overview = """\
24This class represents a dialog that requests a one-line text string from the user.
25It is implemented as a generic wxWindows dialog. Along with the usual wx.Dialog
26style flags, all of the wx.TextCtrl TE_* style flags are accepted, so, for example,
27wx.TE_PASSWORD could be used to create a password dialog.
28
29As with other dialogs of this type, the user input must be retrieved prior to
30destroying the dialog.
31
32"""
33
34
35if __name__ == '__main__':
36 import sys,os
37 import run
38 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])