summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1999-01-22 13:14:06 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1999-01-22 13:14:06 (GMT)
commitd61f92bab39a706ab954199ab39bc72a67bbdbdd (patch)
tree3399d5518bf8dd6e45b1b35a3f07ebd209c7e86d /Mac/Lib
parentf19feb8fb5ce84f1d9cc17e990fe4d06dc561be6 (diff)
downloadcpython-d61f92bab39a706ab954199ab39bc72a67bbdbdd.zip
cpython-d61f92bab39a706ab954199ab39bc72a67bbdbdd.tar.gz
cpython-d61f92bab39a706ab954199ab39bc72a67bbdbdd.tar.bz2
Select the whole default input field in AskString (Joe Strout)
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/EasyDialogs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index 7e94fee..12dbf97 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -75,6 +75,7 @@ def AskString(prompt, default = "", id=257):
SetDialogItemText(h, lf2cr(prompt))
tp, h, rect = d.GetDialogItem(4)
SetDialogItemText(h, lf2cr(default))
+ d.SelectDialogItemText(4, 0, 999)
# d.SetDialogItem(4, 0, 255)
d.SetDialogDefaultItem(1)
d.SetDialogCancelItem(2)
@@ -228,7 +229,7 @@ def test():
ok = AskYesNoCancel("Do you want to proceed?")
ok = AskYesNoCancel("Do you want to identify?", yes="Indentify", no="Don't identify")
if ok > 0:
- s = AskString("Enter your first name")
+ s = AskString("Enter your first name", "Joe")
Message("Thank you,\n%s" % `s`)
text = ( "Working Hard...", "Hardly Working..." ,
"So far, so good!", "Keep on truckin'" )