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: 20
Registered: ‎12-24-2010
My Device: Not Specified
Accepted Solution

Text Input Max Chars

How can I set the Max number of chars on a Text Input?

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

Re: Text Input Max Chars

[ Edited ]

hey ozamarripa,

 

to set the maxChars on a TextInput you would change teh maxChars property of the .textField property of the TextInput object. the textField property is a reference to the inner text field. use the following codea as an example:

 

 

var myInput:TextInput = new TextInput();
myInput.textField.maxChars = 10;
myInput.setSize(300,50);

addChild(myInput);

 

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
Contributor
Posts: 20
Registered: ‎12-24-2010
My Device: Not Specified

Re: Text Input Max Chars

Thanks!! I've just found it a minute ago XD