简体   繁体   中英

Icons for flex tree folders

I have a flex tree and i have some folders that dont have any children in them.

The result is that they are displayed as leaf items. Is there any way to avoid this and let them display as folders? And they shouldn't show the open/close icon either.

<mx:Tree borderThickness="0" defaultLeafIcon="{leafIcon}" folderClosedIcon="{folderClosedIcon}" folderOpenIcon="{folderOpenIcon}" height="100%" id="testTree"
                                     itemClick="test.entityChecked();" itemClose="test.removeEntities(event)" itemOpen="test.addEntityChildren(event)" variableRowHeight="true"
                                     verticalScrollPolicy="off" width="100%" x="0" y="0"/>

Any help would be appraciated.

You could use the setItemIcon() to force the Folder to display correctly. The only thing is you'd have to create a callback to check the tree for empty folders and then set it accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM