Search code examples
apache-flexcolorsstylestextareaflex-spark

Spark TextArea - Change part of text color


How can I change part of my text color in spark.components.TextArea?


Solution

  • TextArea can do that. Try this:

        var format:TextLayoutFormat = new TextLayoutFormat();
        format.color = 0x00ff00;            
        this.textarea.setFormatOfRange(format, startIndex, endIndex);