Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d61f92b

Browse files
committed
Select the whole default input field in AskString (Joe Strout)
1 parent f19feb8 commit d61f92b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Mac/Lib/EasyDialogs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def AskString(prompt, default = "", id=257):
7575
SetDialogItemText(h, lf2cr(prompt))
7676
tp, h, rect = d.GetDialogItem(4)
7777
SetDialogItemText(h, lf2cr(default))
78+
d.SelectDialogItemText(4, 0, 999)
7879
# d.SetDialogItem(4, 0, 255)
7980
d.SetDialogDefaultItem(1)
8081
d.SetDialogCancelItem(2)
@@ -228,7 +229,7 @@ def test():
228229
ok = AskYesNoCancel("Do you want to proceed?")
229230
ok = AskYesNoCancel("Do you want to identify?", yes="Indentify", no="Don't identify")
230231
if ok > 0:
231-
s = AskString("Enter your first name")
232+
s = AskString("Enter your first name", "Joe")
232233
Message("Thank you,\n%s" % `s`)
233234
text = ( "Working Hard...", "Hardly Working..." ,
234235
"So far, so good!", "Keep on truckin'" )

0 commit comments

Comments
 (0)