Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 16
Registered: ‎10-25-2010
My Device: Blackberry Tour 9630
My Carrier: Verizon Wireless

Preventing the virtual keyboard from popping up

Hello Everyone,

 

Would you know of a way to prevent the virtual keyboard from popping up when a user clicks / taps on a TextField that will get auto-populated with different values based on the number of clicks?

 

Thanks.

 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Preventing the virtual keyboard from popping up

hey,

 

currently we do not officially have control over the virtual keyboard. im sure in the future that feature will be available. that being said there is an unofficial approach posted a few weeks back by TheDarkin1978. by being unofficial there is a chance this access might not exist in the future. here is a link to the thread:

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/QNX-Keyboard-Control-UNOFFICIAL/m...

 

hope that helps. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Preventing the virtual keyboard from popping up

hey,

 

just a follow up, here is a possible work around depending on how you want to go about things. the following code usings the TextInput object but disables any use of it (doesnt set the state to disable though). so you can update it and what not but it will never pop up the keyboard nor will the user be able to edit the text input.

 

TextInputTest.as:

 

 

package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.FocusEvent;
import flash.events.MouseEvent;

import qnx.ui.text.TextInput;

[SWF(width="1024",height="600",backgroundColor="#CCCCCC",frameRate="30")]
public class TextInputTest extends Sprite
{
private var textInput:TextInput;

public function TextInputTest()
{
super();

// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

textInput = new TextInput();
textInput.setPosition(10,10);
textInput.setSize(300, 52);
textInput.mouseChildren = false;

textInput.addEventListener(MouseEvent.CLICK, trickery);

addChild(textInput);
}

private function trickery(e:MouseEvent):void
{

e.stopPropagation();

/**
* do stuff here
**/

e.currentTarget.text = "Show some text here";
}

}
}

 

Hope that helps a little. good luck!

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Regular Contributor
Posts: 51
Registered: ‎02-02-2011
My Device: Not Specified

Re: Preventing the virtual keyboard from popping up

You could also fake it by putting a MovieClip/Sprite above the textinput/textfield and having that catch the clicks for you (set it's alpha to 0.0, obviously).

 

Just throwing it out there!

 

Cheers

Contributor
Posts: 16
Registered: ‎10-25-2010
My Device: Blackberry Tour 9630
My Carrier: Verizon Wireless

Re: Preventing the virtual keyboard from popping up

Thanks everyone for your responses.

 

Cheers.

Developer
Posts: 278
Registered: ‎10-27-2010
My Device: Playbook

Re: Preventing the virtual keyboard from popping up

 


Rossman wrote:
You could also fake it by putting a MovieClip/Sprite above the textinput/textfield and having that catch the clicks for you (set it's alpha to 0.0, obviously).

 


That is actually what I ended up doing except I set the alpha to 0.001.  

 

--------------
kdittyr

Accepted PlayBook Applications:
HDB Converter -- Utilities/Calculators
New Developer
Posts: 199
Registered: ‎12-29-2010
My Device: Not Specified

Re: Preventing the virtual keyboard from popping up

I haven't used the QNX SDK (just Flex Hero atm), but does it not have an editable boolean property?

 

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/TextInput.html#editable

Highlighted
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Preventing the virtual keyboard from popping up

@killerspaz: unfortunately the QNX TextInput class doesnt have that property (yet). the closest thing that comes to it is the enabled property. but setting that to true changes the look of the object (unless you edit the skin).

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman