Keyboard in IOS and Field Focus

Dave Kilroy dave at applicationinsight.com
Fri Nov 8 08:59:08 EST 2013


Vaughn

There are lofts of ways of doing this, possibly the simplest is to use the
keyboardActivated handler to first record the loc (or rect) of the target
field in a script local variable (i.e. one which you define outside the
handler at the top of the card script), then using effective screenRect
calculate where the field should be when the keyboard is open, then simply
"set the loc" of the field (or a group containing it), or your could "set
the rect" instead. 

Then in the keyboardDeactivated handler get the original loc (or rect) of
the the target field or group from the script local variable you used
earlier and once again simply set the "loc" or "rect" to that location/rect
to put everything back the way it was when the keyboard closes

Sounds quite complex as I read this back but it's actually easy to do once
you get started coding :)

Dave



-----
"Some are born coders, some achieve coding, and some have coding thrust upon them." - William Shakespeare & Hugh Senior

--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Keyboard-in-IOS-and-Field-Focus-tp4671935p4672062.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list