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
Developer
Posts: 297
Registered: ‎10-30-2010
My Device: PlayBook
My Carrier: other

Multiline TextInput standard API to begin text from top left corner instead of middle

[ Edited ]

Is there a standard property of TextInput to allow text input from Top Left instead of middle, when using Multiline?

(Preferably without modifying the scrollRect and internal component positions).

 

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

Re: Multiline TextInput standard API to begin text from top left corner instead of middle

public class TextArea extends TextInput
{
	public function TextArea( width : int, height : int )
	{
		super();
		this.setSize( width, height );
		this.autoSize = TextFieldAutoSize.LEFT;
		this.textField.scrollRect = new Rectangle(-10,-10,width-10,height-10);

		this.textField.multiline = true;
		this.textField.wordWrap = true;
	}
}

 

Developer
Posts: 297
Registered: ‎10-30-2010
My Device: PlayBook
My Carrier: other

Re: Multiline TextInput standard API to begin text from top left corner instead of middle

Same with this method, the prompt label seems to be in a wrong position (slightly above top border of the TextInput). And I couldnt manage to make it move, in the latest simulator and SDK.