簡體   English   中英

Spark TextArea-更改部分文字顏色

[英]Spark TextArea - Change part of text color

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

TextArea可以做到這一點。 嘗試這個:

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

好吧,TextArea無法做到這一點。 您應該嘗試RichText或一些相關組件。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM