Page 1 of 1
Focus On Nothing
Posted: Sat Aug 01, 2015 9:54 pm
by physicsclassroom
I'm finishing up a educational app that (among other things) delivers Qs and evaluates answers. The only editable field on each question card is the Answer field. I don't want the field to be in focus when the user arrives at the question card; this pops the keyboard up over half the question. So I've been successfully using the focus on nothing command to prevent the keyboard from popping up as the user navigates from question to question within the stack. However there are two bttns that pop-up different stacks and provide generic help and question-specific help. When the user exits out of either help stack, I'm trying to use the focus on nothing command to prevent the same keyboard pop-up. Unfortunately, the focus goes to the answer field and the keyboard pops-up.
Any ideas why focus on nothing is not working when the help stack closes? Or any ideas on how to do a work around?
Re: Focus On Nothing
Posted: Sat Aug 01, 2015 11:07 pm
by dave.kilroy
Check out the 'traversalOn' property of your field - set it to false during preopenstack so the onscreen keyboard won't be fired as the card opens, and a little bit later set it to true so that is performs normally for when the user needs it:
Code: Select all
on preopenstack
set the traversalon of fld "fldAnswer" to false
end preopenstack
on openstack
send initialiseField to me in 2000 millisecs
end openstack
on initialiseField
set the traversalon of fld "fldAnswer" to true
end initialiseField
Re: Focus On Nothing
Posted: Sat Aug 01, 2015 11:33 pm
by dunbarx
Hi.
Can you explain what you mean by the "keyboard" popping up?
Craig Newman
Re: Focus On Nothing
Posted: Sun Aug 02, 2015 12:28 am
by Simon
Hi physicsclassroom,
I just use a hidden button;
Code: Select all
on preOpenCard
focus on btn "focus"
end perOpenCard
The button must have "Focus with keyboard" selected.
Yeah, focus on nothing has it's quirks.
And to stop hurting Craig's head you should mention this is mobile.
Simon
Re: Focus On Nothing
Posted: Sun Aug 02, 2015 4:35 am
by dunbarx
I keep forgetting that when I cannot understand what is going on around me, it is mobil.
Craig
Re: Focus On Nothing
Posted: Sun Aug 02, 2015 5:18 am
by Simon
Hi Craig,
I've just been reminded that there are desktop tablets (e.g. Surface Pro 3) ... I may have been wrong.
Simon
Re: Focus On Nothing
Posted: Tue Aug 04, 2015 7:19 pm
by physicsclassroom
Thank you all. I still had trouble with focus on nothing but was able to accomplish the intended affect by combining the traversalOn property set to TRUE with Simon's trick of focusing on a invisible button.