Page 1 of 1

keyboard shows over text field

Posted: Sun Jun 24, 2012 10:05 am
by dbcbos
Hello,

I'm relatively new to Livecode and new to mobile programming though not new to programming.

I've done some nice test projects like google maps, data grid, geometry, notifications etc. all work. So I thought most of the hard part of learning has been done and got on with building my actual app to put it all together, but I got an issue early on I don't know how to solve.

I made a layout which I like, but I have a problem with it:

How can I when the keyboard shows, autoscroll the app down so the field and the keyboard are visible. Atm the keyboard just moves over the field and its not visible anymore? Should be simple but don't know how.

Cheers for the assistance.

Re: keyboard shows over text field

Posted: Sun Jun 24, 2012 10:15 am
by Mark
Hi,

The dictionary of my LiveCode version says this is available for iPhone only, maybe this has changed in the latest version:

Code: Select all

on inputBeginEditing
   set the rect of the target to <some other rect>
end inputBeginEditing
If this doesn't work, maybe you can use the openField message. To reset the rect of the field, you 'll need either the closeField and exitField messages or the inputEndEditing message.

Kind regards,

Mark

Re: keyboard shows over text field

Posted: Fri Jun 29, 2012 8:24 pm
by dbcbos
Thanks Mark.

I went with a native text field so it does it automatic now, but your solution works to. Just with a livecode text field you need to use openfield and exitfield. Only problem I had with that was if someone pulled down the keyboard it staid in that position. There probably is a workaround for that, but haven't put the time in it.