【问题标题】:Multiple text color in one spark:TextInput多个文本颜色在一个火花中:TextInput
【发布时间】:2012-04-22 16:40:20
【问题描述】:

如何在 spark:TextInput 中用两种或多种颜色为单词着色?

我用 mx:TextInputhtmlText 属性做到了,但我在 spark 组件中找不到它。

谢谢

【问题讨论】:

    标签: actionscript-3 apache-flex colors textinput flex-spark


    【解决方案1】:
    <s:TextArea id="txt_ar"  textAlign="justify"
    borderAlpha="0" editable="false">
    

    然后写你的html字符串

    textrichtml:String = "your html string"
    

    然后使用以下代码。

    txt_ar.textFlow = TextConverter.importToFlow(textrichtml,TextConverter.TEXT_FIELD_HTML_FORMAT);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-19
      • 2019-11-25
      相关资源
      最近更新 更多