I want to make auto width text area. Using xml to pull the data, I would like to expand as data comes in.
menu_item_group["menu_item" + i].item_label = nodes[i].attributes.item_label;
For example:
enlarged according to the context menus in this example, the background
http://webscripts.softpedia.com/scriptScreenshots/AS3-XML-MENU—VERTICAL—Screenshots-53313.html
How can I do this?
I cooked up a light example for you. The most important part to note is the
myField.autoSizeas that will do what you are looking for. I useLEFTby default, but there is alsoCENTERandRIGHT. Anyway, in this working example you’ll see that the border always fits to the length of the text and that the length is new every time you run the program. Note that this example only works when theTextFieldis set to Single Line. Multi Line works differently. Good Luck!