Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex Spark TextArea-更改部分文本颜色_Apache Flex_Colors_Styles_Textarea_Flex Spark - Fatal编程技术网

Apache flex Spark TextArea-更改部分文本颜色

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

如何更改spark.components.TextArea中的部分文本颜色?

嗯,TextArea不能这样做。您应该尝试RichText或其他相关组件


好吧,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);