]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/TextEntryDialog.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
.TextEntryDialog(
12 frame
, 'What is your favorite programming language?',
15 dlg
.SetValue("Python is the best!")
17 if dlg
.ShowModal() == wx
.ID_OK
:
18 log
.WriteText('You entered: %s\n' % dlg
.GetValue())
23 #---------------------------------------------------------------------------
28 This class represents a dialog that requests a one-line text string from the user.
29 It is implemented as a generic wxWindows dialog. Along with the usual wxDialog
30 style flags, all of the wxTextCtrl TE_* style flags are accepted, so, for example,
31 wx.TE_PASSWORD could be used to create a password dialog.
33 As with other dialogs of this type, the user input must be retrieved prior to
34 destroying the dialog.
39 if __name__
== '__main__':
42 run
.main(['', os
.path
.basename(sys
.argv
[0])])