Mercy
Mercy

Reputation: 1860

In ActionScript3 I cannot view a long text in TextInput

Hi, I design a TextInput by using components in Flash, height=240 width=400. While I'm typing a long text, half of the text is cut out. How can i correct this problem? Thanks in advance!

Upvotes: 0

Views: 492

Answers (3)

Benny
Benny

Reputation: 2228

var _txt:TextField = new TextField();
addChild(_txt);
_txt.type = TextFieldType.INPUT;
_txt.wordWrap = true;
_txt.autoSize = TextFieldAutoSize.LEFT;

autosize will gives the flexible automatic sizing and alignment. and in your case do not set height for the textfield.

Upvotes: 0

sanjay
sanjay

Reputation: 126

you can make your textField multiline and make text wrapped like

txt.multiline=true;
txt.wordWrap=true;
txt.width=400;

Upvotes: 2

Sr.Richie
Sr.Richie

Reputation: 5740

it's as easy as

 yourTextField.wordWrap = true;

Upvotes: 1

Related Questions