【问题标题】:HTML in Spark TextAreaSpark TextArea 中的 HTML
【发布时间】:2011-03-20 16:40:30
【问题描述】:

尝试在 Mobile Flex 4.5 中向 TextArea 添加一些 html,但不断收到错误消息:

"1180: 调用一个可能未定义的 方法 StyleableTextField。”

对于以下行:

StyleableTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>";

【问题讨论】:

  • 请记住,因为这是一个移动应用,所以似乎不支持 textFlow 属性。

标签: actionscript mobile flex4


【解决方案1】:

看起来像:

MobileTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>";

有效。只需要导入:

import spark.components.supportClasses.MobileTextField;

让它工作。

【讨论】:

    【解决方案2】:

    不能直接设置TextArea实例的htmlText属性吗?

    类似这样的:

    myTextArea.htmlText = "sample <b>text</b>";
    

    罗伯

    【讨论】:

    • 触发:通过静态类型 spark.components:TextArea 的引用访问可能未定义的属性 htmlText
    猜你喜欢
    • 1970-01-01
    • 2014-08-22
    • 1970-01-01
    • 2023-01-04
    • 2011-09-22
    • 1970-01-01
    • 1970-01-01
    • 2017-02-05
    • 2013-08-15
    相关资源
    最近更新 更多