如何更改spark.components.TextArea
中的部分文字颜色?
答案 0 :(得分:2)
TextArea可以做到这一点。试试这个:
var format:TextLayoutFormat = new TextLayoutFormat();
format.color = 0x00ff00;
this.textarea.setFormatOfRange(format, startIndex, endIndex);
答案 1 :(得分:1)
好吧,TextArea无法做到这一点。您应该尝试使用RichText或一些相关组件。
http://help.adobe.com/en_US/flex/using/WS02f7d8d4857b1677-165a04e1126951a2d98-7fca.html