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.
Auto Focus On Edit Field - How To Cancel It
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Auto Focus On Edit Field - How To Cancel It
Hi,
You may try "focus on nothing" on opencard.
Best regards
Jean-Marc
You may try "focus on nothing" on opencard.
Best regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Auto Focus On Edit Field - How To Cancel It
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.
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
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com