Keyboard in IOS and Field Focus

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


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 :)


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

View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list