[URL=“http://stackoverflow.com/questions/5374561/flex-4-1-richtext-richeditabletext-autosizing#”]
In the past, I used the flash.text.textField object something like this:
tf = textField();
tf.autoWrap = true
tf.autoSize = “left”
tf.width = 100;
tf.text = “Text that is too long to fit in the textfield, so it autowraps, automatically updating the height.”
addChild(tf);
someNewObject = new MovieClip();
someNewObject.y = tf.height + 5;
addchild(someNewObject);
Doing this would dynamically place my someNewObject just below the textField.
I’m trying to find a TLF component that allows me to do this.
I tried using mc.core.FTETextField. It resizes great, but does not support HTML
I tried using the Spark TextArea, but apparently, the technique of setting heightByLines = NAN no longer works.
I saw someone say to use RichEditableText, because it supports auto-sizing, but I cannot figure out how.
This is for static text. Not for dynamic or input text.
I’m coding this, so if you have some suggestions, please post them in code, not MXML.