Selecting after the text of an ask dialog

Sarah Reichelt sarah.reichelt at gmail.com
Tue Feb 7 23:37:27 EST 2006


Hi All,

By default, when you do an "ask" and supply a default value, Rev
selects all the text in the ask dialog's entry field. I have a case
were the data entered needs a prefix, which the program can calculate
and display, but then I want the users to append more data. In this
case, I wanted the cursor to appear after the text instead of having
it all selected.

Here is what I worked out to do this:

on getInfo
    send selectAfterAskText to me in 1 tick
    ask info "What?" with "ABC"
end getInfo

on selectAfterAskText
    select after text of fld ID 1119 of stack "Ask Dialog"
end selectAfterAskText

I thought others might need the same thing so here it is :-)

Cheers,
Sarah



More information about the Use-livecode mailing list