我得到的文件夹图标,从来没有标签。我试过很多数据源,总是一样的东西。文件,ajax调用,文本,它总是失败。Flex树不会显示标签,只是图标
在下面的代码中,我甚至设置了自定义处理程序并观察XML进来,我设置了一个静态文本标签。从不显示任何东西这发生在没有标签功能和使用labelField的情况下。是的,我100%确定属性匹配。再次尝试使用众多不同的数据源。
我不知道什么会模糊文字,但不是图标。但我也检查了。
试过this simple one file example,它编译得很好。
的完整代码如下:
<?xml version="1.0" encoding="utf-8"?>
<s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
<fx:Declarations>
<fx:XML id="selectedData2" source="assets/xml/orgchartmodel.xml"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
private function tree_labelFunc(item:XML):String {
var label:String;
label = "flexisshit"; //breakpoint hits here but I never see this text
return label;
}
]]>
</fx:Script>
<mx:Tree id="tree" dataProvider="{selectedData2}" labelFunction="tree_labelFunc" width="100%" height="100%" showRoot="false" textDecoration="underline" textSelectedColor="0xFFCCFF" depthColors="[#FFFFFF, #EEEEEE, #DDDDDD, #CCCCCC, #BBBBBB, #AAAAAA]" />
</s:HGroup>
上述
<employee layout="default" name="Eric Joplin" email="[email protected]" phone="555-0100" fax="555-0101" businessUnit="Management" status="present" gender="male">
<employee name="Gary Roberts" layout="left_below" email="[email protected]" phone="555-0100" fax="555-0101" businessUnit="Logistics" status="present" gender="male">
<employee layout="default" name="Alexander Burns" email="[email protected]" phone="555-0102" fax="555-0103" businessUnit="Logistics" status="present" gender="male"/>
<employee layout="default" name="John Conner" email="[email protected]" phone="555-0104" fax="555-0105" businessUnit="Logistics" status="present" gender="male"/>
</employee>
<employe ....
你embeding字体?因为你需要嵌入两次。一次用于spark组件,一次用于mx组件。 –
不是我所知道的。我需要吗?我过去使用过flex,似乎没有回想起它需要树。 – Maximegalon