Page 1 of 1

Stop my inputs activating keyboard on start

Posted: Wed May 25, 2011 9:07 pm
by doobox
Hi there,

I cant find the right way to stop my text input field "feild1" from activating the keyboard on app start.

I have tried, on the card:
on preopencard
focus on nothing
end preopencard

Keyboard still becomes active and feild1 takes the focus.

Re: Stop my inputs activating keyboard on start

Posted: Wed May 25, 2011 9:27 pm
by bn
Hi Doobox,

I suppose you have also a button on the card. You could send the button all the way back in the properties inspector (size and position) and in the properties inspector set the traversalOn to true, set the showFocusBorder to false.

When a card opens the focus goes to the first object (first as in layer the lower the number the 'firster') that is focusable. This way your field does not get the focus when opening a card and the keyboard does not pop up. The fact that the button gets the focus is of no matter and not visible if you set the showFocusBorder to false.

If you don't have a button on the card you could use this technique with another object that is focusable.

Kind regards

Bernd

Re: Stop my inputs activating keyboard on start

Posted: Wed May 25, 2011 9:38 pm
by doobox
Hi there,

Thank-you, that makes sense.

I was just trying to code:
Disable the keyboard before card opens
Focus nothing after card opens
Then re-enable the keyboard.

Not sure if that would work, did not finish it yet. But your method sounds a lot easier and one i will now adopt.