Flex: Tree如何展开/关闭一个节点, 并选中其孩子? 如何关闭所有的节点?

_treeOUs.expandChildrenOf(currentOU, true); // 展开目录 

_treeOUs.selectedItem = ou; //选定孩子

_treeOUs.openItems = []; // 关闭所有节点;

expandChildrenOf(item:Object, open:Boolean):void
Opens or closes all the tree items below the specified item.

expandItem(item:Object, open:Boolean, animate:Boolean = false, dispatchEvent:Boolean = false, cause:Event = null):void
Opens or closes a branch item.

This entry was posted in ActionScript and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>