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
New Developer
Posts: 61
Registered: ‎06-07-2011
My Device: Playbook
My Carrier: Employee

TextInput ReturnkeyType

Hi every one,

 

I have a problem in while setting the ReturnkeyType of the TextInput, I am changing default enter symbol to other like Done, Search etc.., its working fine in the simulator but in the device its showing default enter symbol, am I missing any thing?, can any one tell me the solution.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: TextInput ReturnkeyType

Which TextInput class?
Developer
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: TextInput ReturnkeyType

Set it with .returnKeyLabel. String value. 

 

import qnx.fuse.ui.text.TextInput;
suckaFish.prompt = "One fish two fish.";
suckaFish.setPosition(15, 15);
suckaFish.width = 250;
suckaFish.returnKeyLabel = "Create";
addChild(suckaFish);

 

New Developer
Posts: 61
Registered: ‎06-07-2011
My Device: Playbook
My Carrier: Employee

Re: TextInput ReturnkeyType

import qnx.ui.text.TextInput;

 

private var searchInput:TextInput;
searchInput = new TextInput();
searchInput.returnKeyType = ReturnKeyType.DONE;

 

 I am using the above code

Developer
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: TextInput ReturnkeyType

Then you'll need to also import:

 

import qnx.ui.text.ReturnKeyType;

You don't have to use ReturnKeyType.DONE if you want to use your own. For instance, I have a return key set to "Create". Just:

 

searchInput.returnKeyType = "Search";
Developer
Posts: 610
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Re: TextInput ReturnkeyType

returnKeyType

and Label do not seem to be working in 2.0.1

 

FB 4.6

 

using qnx.fuse.ui.text.* package

Highlighted
Developer
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: TextInput ReturnkeyType

Check your imports:

 

import qnx.fuse.ui.text.TextInput;
import qnx.fuse.ui.text.KeyboardType;

 

var fishy:TextInput = new TextInput();
fishy.returnKeyLabel = "Trout";
fishy.softKeyboardType = KeyboardType.EMAIL;
fishy.setPosition(100, 100);
addChild(fishy);