1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
import wx
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
2003-12-09 01:23:28 +00:00
|
|
|
dlg = wx.TextEntryDialog(
|
|
|
|
frame, 'What is your favorite programming language?',
|
2004-01-13 03:17:17 +00:00
|
|
|
'Eh??', 'Python')
|
2003-12-09 01:23:28 +00:00
|
|
|
|
2002-02-21 00:50:27 +00:00
|
|
|
dlg.SetValue("Python is the best!")
|
2003-12-09 01:23:28 +00:00
|
|
|
|
|
|
|
if dlg.ShowModal() == wx.ID_OK:
|
1999-04-30 03:29:54 +00:00
|
|
|
log.WriteText('You entered: %s\n' % dlg.GetValue())
|
2003-12-09 01:23:28 +00:00
|
|
|
|
1999-04-30 03:29:54 +00:00
|
|
|
dlg.Destroy()
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-07-02 23:13:10 +00:00
|
|
|
overview = """\
|
2003-12-09 01:23:28 +00:00
|
|
|
This class represents a dialog that requests a one-line text string from the user.
|
2004-01-13 03:17:17 +00: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-09 01:23:28 +00:00
|
|
|
wx.TE_PASSWORD could be used to create a password dialog.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
As with other dialogs of this type, the user input must be retrieved prior to
|
|
|
|
destroying the dialog.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
"""
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
|
2003-07-02 23:13:10 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
2004-03-05 00:06:33 +00:00
|
|
|
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|