Field with "Focus with Keyboard" checked? - Solved

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Field with "Focus with Keyboard" checked? - Solved

Post by DR White » Wed Dec 21, 2016 12:26 am

How do I get the cursor to leave a field with "Focus with Keyboard" checked, when I click on a button?

(see attached file)

Thanks,

David
Attachments
Test_1A.livecode.zip
(1.1 KiB) Downloaded 210 times
Last edited by DR White on Wed Dec 21, 2016 12:56 pm, edited 3 times in total.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Field with "Focus with Keyboard" checked?

Post by Dixie » Wed Dec 21, 2016 1:31 am

This works... :-)

Code: Select all

on mouseUp
   click at 0,0
   --set traversalOn of fld "DataEntry" to false
end mouseUp

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Field with "Focus with Keyboard" checked?

Post by [-hh] » Wed Dec 21, 2016 1:42 am

Yet another option is in the button's script

Code: Select all

 select empty 
If you wish to have a check for exactly "yes" then the field's script could also trigger to loose focus:

Code: Select all

on textchanged
   if me is "yes" then select empty
end textchanged
shiftLock happens

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Field with "Focus with Keyboard" checked?

Post by DR White » Wed Dec 21, 2016 2:55 am

Dixie and -hh,

The click at 0,0 works good in the IDE, but not with the IOS simulator.

The select "Empty" works well in both IDE and IOS simulator.

Thanks so much to both of you,

David

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Field with "Focus with Keyboard" checked? - Not Yet Solv

Post by DR White » Wed Dec 21, 2016 3:26 am

Well........

The "Select Empty" took care of the blinking cursor in the Data box,
but the keyboard on the IOS device still remains.

How do I force the IOS keyboard to shut down?

Thanks,

David

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Field with "Focus with Keyboard" checked? - Not Yet Solv

Post by DR White » Wed Dec 21, 2016 3:27 am

Well........

The "Select Empty" took care of the blinking cursor in the Data box,
but the keyboard on the IOS device still remains.

I looked in the dictionary under keyboard, but did not find anything that would control the IOS keyboard.

How do I force the IOS keyboard to shut down?

Thanks,

David

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Field with "Focus with Keyboard" checked? - Not Yet Solv

Post by [-hh] » Wed Dec 21, 2016 4:45 am

David, John (dixie) answered this already:

http://forums.livecode.com/viewtopic.ph ... 514#p48573
shiftLock happens

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Field with "Focus with Keyboard" checked? - Not Yet Solv

Post by DR White » Wed Dec 21, 2016 12:55 pm

Thanks so much,

David

Post Reply