0

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

zero323
  • 322,348
  • 103
  • 959
  • 935
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216

2 Answers2

2

TextArea can do that. Try this:

    var format:TextLayoutFormat = new TextLayoutFormat();
    format.color = 0x00ff00;            
    this.textarea.setFormatOfRange(format, startIndex, endIndex);
cankillah
  • 36
  • 2
1

Well, TextArea cannot do that. You should try RichText or some related component.

http://help.adobe.com/en_US/flex/using/WS02f7d8d4857b1677-165a04e1126951a2d98-7fca.html

marianboda
  • 771
  • 6
  • 14