【问题标题】:Spark TextArea - Change part of text colorSpark TextArea - 更改部分文本颜色
【发布时间】:2012-10-25 10:35:17
【问题描述】:

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

【问题讨论】:

    标签: apache-flex colors styles textarea flex-spark


    【解决方案1】:

    TextArea 可以做到这一点。试试这个:

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

    【讨论】:

      【解决方案2】:

      好吧,TextArea 不能这样做。你应该试试 RichText 或一些相关的组件。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-02-05
        • 2015-01-10
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多