I'm trying to make some textfields in flex, using the Text
component, but i want to disable the multiline thing, and make it
autosize, but those features seems to have disappeared. I made a
crazy hack that really destroys performands by reading the render
event on a textfield and calculate the text width and set the width
of the textfield. But i really don't want to do this on all my
Any ideas and solutions to this?
And yeah, this uses both flex and as3, but mostly as3,
therefore i put it in this category...
Try (if your are using a TextField as the base) setting the
instances autoSize property to :
This forces the left margin to "stick" and the right to size
as necessary. This same property is available in Flash as well. If
you have multiple instances that you want to treat this way, use
css (either apply to all TextFields, or assign a specific
styleclass to each).
Edit: Also to qoute the docs "If you leave both the width
and the height unspecified, Flex will calculate them based on any
explicit line breaks in the text, with no wordwrapping within