Apache flex Flex 4.6-自定义项目呈现器-HTML格式文本

Apache flex Flex 4.6-自定义项目呈现器-HTML格式文本,apache-flex,actionscript,flex4,flex4.5,itemrenderer,Apache Flex,Actionscript,Flex4,Flex4.5,Itemrenderer,如何在Spark自定义项目渲染器Actionscript中显示HTML格式的文本 示例代码: item.post_内容中的html内容在下面的IconItemRenderer messageFunction代码段中显示为纯文本,这只是为图标项目渲染器生成的默认代码: <s:itemRenderer> <fx:Component> <s:IconItemRenderer iconField="iconField" iconWidth="64" iconH

如何在Spark自定义项目渲染器Actionscript中显示HTML格式的文本

示例代码:

item.post_内容中的html内容在下面的IconItemRenderer messageFunction代码段中显示为纯文本,这只是为图标项目渲染器生成的默认代码:

<s:itemRenderer> <fx:Component> <s:IconItemRenderer iconField="iconField" iconWidth="64" iconHeight="64" labelField="post_title" messageFunction="getPost"> <fx:Script> <![CDATA[ private function getPost(item:Object):String{ return item.post_content; } ]]> </fx:Script> </s:IconItemRenderer> </fx:Component> </s:itemRenderer>
使用定制的皮肤,做你想要的


注意:message函数是在项目的更高级别提供的回调函数,而不是渲染器的私有方法。

添加代码示例会更有帮助,尽管我不确定代码示例是否有帮助。我只是在寻找一种在列表项中显示html格式数据的方法。在自定义移动皮肤中,它表示不能在移动应用程序中使用htmlText属性。-所以我不确定这是不是正确的方法…你没有说移动。但是我认为如果你想要html格式的文本,你要么需要使用htmlText属性,但我认为这可能是一个mx属性,要么你需要使用基于tlf的控件,这可能更重。