1999-04-29 23:29:54 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
import wx
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
2003-12-08 20:23:28 -05:00
|
|
|
dlg = wx.TextEntryDialog(
|
|
|
|
frame, 'What is your favorite programming language?',
|
2004-01-12 22:17:17 -05:00
|
|
|
'Eh??', 'Python')
|
2003-12-08 20:23:28 -05:00
|
|
|
|
2002-02-20 19:50:27 -05:00
|
|
|
dlg.SetValue("Python is the best!")
|
2003-12-08 20:23:28 -05:00
|
|
|
|
|
|
|
if dlg.ShowModal() == wx.ID_OK:
|
1999-04-29 23:29:54 -04:00
|
|
|
log.WriteText('You entered: %s\n' % dlg.GetValue())
|
2003-12-08 20:23:28 -05:00
|
|
|
|
1999-04-29 23:29:54 -04:00
|
|
|
dlg.Destroy()
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-07-02 19:13:10 -04:00
|
|
|
overview = """\
|
2003-12-08 20:23:28 -05:00
|
|
|
This class represents a dialog that requests a one-line text string from the user.
|
2004-01-12 22:17:17 -05:00
|
|
|
It is implemented as a generic wxWindows dialog. Along with the usual wx.Dialog
|
|
|
|
style flags, all of the wx.TextCtrl TE_* style flags are accepted, so, for example,
|
2003-12-08 20:23:28 -05:00
|
|
|
wx.TE_PASSWORD could be used to create a password dialog.
|
1999-04-29 23:29:54 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
As with other dialogs of this type, the user input must be retrieved prior to
|
|
|
|
destroying the dialog.
|
1999-04-29 23:29:54 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
"""
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
|
2003-07-02 19:13:10 -04:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
|
|
|
run.main(['', os.path.basename(sys.argv[0])])
|