Page 1 of 1
Auto Focus On Edit Field - How To Cancel It
Posted: Tue Aug 27, 2019 11:08 am
by Googie85
Hi Guys!!!
I am trying to launch my app without automatically focusing on an edit field. I have the following code,
on openStack
focus on nothing
end openStack
That does not seem to work. Any ideas would be awesome!
Many Thanks,
Googie.
Re: Auto Focus On Edit Field - How To Cancel It
Posted: Tue Aug 27, 2019 12:05 pm
by jmburnod
Hi,
You may try "focus on nothing" on opencard.
Best regards
Jean-Marc
Re: Auto Focus On Edit Field - How To Cancel It
Posted: Tue Aug 27, 2019 4:54 pm
by jacque
I wish there was a switch to turn off this automatic behavior. More than half the time I don't want any field selected when a card opens. There is nothing you can do in any of the pre* or open* messages to stop it, but you can manage it with a workaround.
The traversalOn property controls whether an automatic selection occurs, so turn it off in a preopencard handler and then send a message to turn it back on, if necessary, after the card has completely finished loading.
Code: Select all
on preOpenCard
set the traversalOn of fld 1 to false
send "traversalOff" to me in 10 milliseconds
end preOpenCard
on traversalOff
set the traversalOn of fld 1 to true
end traversalOff