]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/TextEntryDialog.py
4 #---------------------------------------------------------------------------
6 def runTest(frame
, nb
, log
):
7 dlg
= wx
.TextEntryDialog(
8 frame
, 'What is your favorite programming language?',
11 dlg
.SetValue("Python is the best!")
13 if dlg
.ShowModal() == wx
.ID_OK
:
14 log
.WriteText('You entered: %s\n' % dlg
.GetValue())
19 #---------------------------------------------------------------------------
24 This class represents a dialog that requests a one-line text string from the user.
25 It is implemented as a generic wxWindows dialog. Along with the usual wx.Dialog
26 style flags, all of the wx.TextCtrl TE_* style flags are accepted, so, for example,
27 wx.TE_PASSWORD could be used to create a password dialog.
29 As with other dialogs of this type, the user input must be retrieved prior to
30 destroying the dialog.
35 if __name__
== '__main__':
38 run
.main(['', os
.path
.basename(sys
.argv
[0])])