简体   繁体   中英

Spark TextArea - Change part of text color

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

TextArea can do that. Try this:

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM