【问题标题】:Can I define multiple itemRenderers in a Flex / Actionscript list我可以在 Flex / Actionscript 列表中定义多个 itemRenderer
【发布时间】:2010-11-01 10:44:31
【问题描述】:

基本上我想重写 flex/actionscript 列表类中的一些函数,该函数创建一个新的 ItemRenderer 并将所需的数据传递给它以准备显示。我需要这样做,因为我希望根据显示的数据类型显示不同的渲染器。有这样的功能吗?

我真的不想将单个 itemRenderer 传递给列表,该 itemRenderer 根据它所拥有的数据类型调用其 addChild 函数 - 它看起来不正确......

谢谢。

【问题讨论】:

    标签: apache-flex list actionscript user-interface


    【解决方案1】:

    您应该覆盖 ListBase 类的公共方法 createItemRenderer(data:Object):IListItemRenderer(和 List,它扩展了 ListBase

    【讨论】:

    • 天啊!我怎么没看到那个功能!我一定要失明了。谢谢你的帮助伙计:)
    猜你喜欢
    • 1970-01-01
    • 2011-06-05
    • 2012-04-18
    • 1970-01-01
    • 2012-02-11
    • 1970-01-01
    • 1970-01-01
    • 2012-08-04
    • 2011-04-30
    相关资源
    最近更新 更多