Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

textbox autoresizing in actionscript3

I need to realize textbox autoresizing in actionscript3(IDE - adobe flash pro cs3). For example my textarea is in width 100 px, user has been wrote in it something, that is bigger than 100 px, then my textbox should become increasingly. any ideas?

Also I can't realize multiline option: when the text goes beyond the textbox, it starts to scroll. In line type I've chosen 'multiline'.

thanks

like image 425
dark Avatar asked Dec 05 '25 18:12

dark


2 Answers

try this:

textfield.autoSize = "left";
textfield.multiline = true;
textfield.wordWrap = true;

Hope it helps, Rob

like image 140
robertp Avatar answered Dec 08 '25 11:12

robertp


If you want to resize textfield automaticaly you can use textfield.autoSize property.

Wnen you are using multiline textfield, then setting

textfield.autoSize = TextFieldAutoSize.LEFT; 

will align text to left and resize field vertically. If you use single line text field, it will resize to the right.

like image 33
Bartek Avatar answered Dec 08 '25 12:12

Bartek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!