Apache flex Spark TextArea-更改部分文本颜色
如何更改spark.components.TextArea中的部分文本颜色?嗯,TextArea不能这样做。您应该尝试RichText或其他相关组件Apache flex Spark TextArea-更改部分文本颜色,apache-flex,colors,styles,textarea,flex-spark,Apache Flex,Colors,Styles,Textarea,Flex Spark,如何更改spark.components.TextArea中的部分文本颜色?嗯,TextArea不能这样做。您应该尝试RichText或其他相关组件 好吧,TextArea不能这么做。您应该尝试RichText或其他相关组件 TextArea可以做到这一点。试试这个: var format:TextLayoutFormat = new TextLayoutFormat(); format.color = 0x00ff00; this.textare
好吧,TextArea不能这么做。您应该尝试RichText或其他相关组件
TextArea可以做到这一点。试试这个:
var format:TextLayoutFormat = new TextLayoutFormat();
format.color = 0x00ff00;
this.textarea.setFormatOfRange(format, startIndex, endIndex);
TextArea可以做到这一点。试试这个:
var format:TextLayoutFormat = new TextLayoutFormat();
format.color = 0x00ff00;
this.textarea.setFormatOfRange(format, startIndex, endIndex);