flex tree操作
发布日期:2022-02-15 02:36:10 浏览次数:7 分类:技术文章

本文共 1406 字,大约阅读时间需要 4 分钟。

; trace("test") }//initapp //starts at the given node, walks up the tree opening nodes as it goes private function expandParents(xmlNode:XML):void { while (xmlNode.parent() != null) { xmlNode = xmlNode.parent(); myTree.expandItem(xmlNode,true, false); } }//expandParents //uses e4x to find a node, then calls expand parents to make it visible, //then selects it private function findNodeById(sId:String):void{ var xmllistDescendants:XMLList = _xmlData.descendants().(@eid == sId); expandParents(xmllistDescendants[0]); myTree.selectedItem = xmllistDescendants[0]; }//findNodeById ]]>

树中查找节点

 

 

树中全部展开

tree.callLater(expandTree,new Array(xml));   	private function expandTree(xml:XML):void{  		     tree.expandChildrenOf(xml , true);  		}

转载地址:https://blog.csdn.net/peterlu20110415/article/details/6623621 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:JS 文件压缩与反压缩
下一篇:利用link标签rel="alternate stylesheet"属性实现界面动态换肤

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月14日 17时01分26秒