Keyboard covers text field when typing

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

ECNU4271
Posts: 93
Joined: Tue May 07, 2013 4:33 pm

Re: Keyboard covers text field when typing

Post by ECNU4271 » Tue Aug 27, 2013 10:15 pm

In the original card or the "only fields" card(the card after clicking edit group )?

ECNU4271
Posts: 93
Joined: Tue May 07, 2013 4:33 pm

Re: Keyboard covers text field when typing

Post by ECNU4271 » Tue Aug 27, 2013 10:21 pm

I found a command in the dic and tried in my app. It doesnt work.

Here is the code

on keyboardActivated
set the vScroll of group "Fields" to 50
end keyboardActivated

The code should be put in the card script or group script by the way?

Michael

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 10:36 pm

I've found keyboardActivated to be flaky.

Does your group "Fields" have a vertical scrollbar?

If so then put this into a button:
on mouseUp
set the vScroll of group "Fields" to 50
end mouseUp

What happens?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ECNU4271
Posts: 93
Joined: Tue May 07, 2013 4:33 pm

Re: Keyboard covers text field when typing

Post by ECNU4271 » Tue Aug 27, 2013 10:38 pm

Simon wrote:I've found keyboardActivated to be flaky.

Does your group "Fields" have a vertical scrollbar?

If so then put this into a button:
on mouseUp
set the vScroll of group "Fields" to 50
end mouseUp

What happens?

Simon
My group doesn't have a vertical scrollbar.

The fields are seperated
Name: _____
Password: ______
Membership No.:_____

like this.


What next...

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Keyboard covers text field when typing

Post by endernafi » Tue Aug 27, 2013 10:42 pm

Michael hi,

* When keyboard activated, collapse your group and turn on the vScrollBar.
* When keyboard disappears, expand your group and turn off the vScrollBar.
* vScroll is not the scrollbar, it is how much the content is scrolled as in pixels.

Have a look at this stack, it's what Simon meant:
ecnu4271.zip
(1.47 KiB) Downloaded 320 times
Hope it helps...

Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

ECNU4271
Posts: 93
Joined: Tue May 07, 2013 4:33 pm

Re: Keyboard covers text field when typing

Post by ECNU4271 » Tue Aug 27, 2013 10:47 pm

endernafi wrote:Michael hi,

* When keyboard activated, collapse your group and turn on the vScrollBar.
* When keyboard disappears, expand your group and turn off the vScrollBar.
* vScroll is not the scrollbar, it is how much the content is scrolled as in pixels.

Have a look at this stack, it's what Simon meant:
ecnu4271.zip
Hope it helps...

Best,

~ Ender Nafi
Thanks, Ender Nafi!

I've read your script. It really gives me the clue.

Now I have to reasearch your script to know exactly how it works and applies it into my other necessary cards, although you offered quite a few XXXXField commands ...... :D

I am still going to keep waiting for Simon. See if he can give a better option ~~~

He's really a good man and I really really thank him!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 10:50 pm

Did you follow my post that said make the group vertically larger????

Group all the content of the card.
Make the group vertically larger (twice as large for now) by using the Inspector, ensuring that all the content is at the top of the group. Position the group so that all content is visible, lock the size of the group. Turn on the groups vertical scroll bar for now.

You should now be able to scroll the page up and down manually, the content should leave the screen as you scroll down.

now try that button script

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Keyboard covers text field when typing

Post by endernafi » Tue Aug 27, 2013 10:52 pm

ECNU4271 wrote:Although you offered many XXXXField commands :D
Those events do activate / deactivate the keyboard, they are the reason.
So, you have to script them.
As Simon stated, keyboardActivated message is somewhat flaky.

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 10:57 pm

I take my last post back...
Hold on checking...

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ECNU4271
Posts: 93
Joined: Tue May 07, 2013 4:33 pm

Re: Keyboard covers text field when typing

Post by ECNU4271 » Tue Aug 27, 2013 11:02 pm

hey Simon,

I did what you told me.

The fields go up to the top of the card. The scrollbar shows up but it is not working.

Nothing happens after I click the button.(I've entered the script)

Michael

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 11:08 pm

Ok back again, sorry.
Ungroup your card (to start fresh) make sure all the objects are in the correct place.
Again group all the objects in your card.
Lock the group size (everything should be visible and the group should be about the size of your card)
Now the spacer...

Edit the group and add a blank image (no boarder) to the bottom of your group make it's vertical size twice the card size, move it to the bottom of the group.
Turn on the vertical scroll bar.

You should now have a group that you can manually scroll up and down (Yes?)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 11:10 pm

Example of a scrolling group:
Attachments
grp_scroll.zip
(859 Bytes) Downloaded 285 times
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ECNU4271
Posts: 93
Joined: Tue May 07, 2013 4:33 pm

Re: Keyboard covers text field when typing

Post by ECNU4271 » Tue Aug 27, 2013 11:11 pm

how to add a blank image?

import?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 11:12 pm

drag 'n drop from the tools???
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard covers text field when typing

Post by Simon » Tue Aug 27, 2013 11:13 pm

Might be better to use a graphic object rather than an image
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply