I have the following code:
var vg:VGroup = new VGroup();
var summary:TextArea = new TextArea();
summary.text = "something"
var tlf:TextLayoutFormat = new TextLayoutFormat();
tlf.fontSize = 18;
tlf.fontWeight = "bold";
tlf.color = 0xFF0000;
summary.setFormatOfRange(tlf, 0, 2);
vg.addElement(summary);
(the TextArea is a spark.components.TextArea)
This doesn't work, no errors or anything - it just does nothing to the text. The text is there - but without any kind of formatting.
However, I see examples where this works on the internet - but always when the TextArea isn't created dynamically.
Is what I'm trying to do even possible with a TextArea?