加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex tree默认展开第一项和所有项

发布时间:2020-12-15 04:29:43 所属栏目:百科 来源:网络整理
导读:在页面组件完成后开发做动作: s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:view="com.greencloud.view.*" xmlns:mx="library://ns.adobe.com/flex/mx" height="100%" width="100%" cr

在页面组件完成后开发做动作:


<s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:view="com.greencloud.view.*"
			   xmlns:mx="library://ns.adobe.com/flex/mx"  height="100%" width="100%" creationComplete="application1_applicationCompleteHandler(event)">
展开第一项:
protected function application1_applicationCompleteHandler(event:FlexEvent):void
			{	
				var item:XML  = this.managerTree.dataProvider[0];  	
				this.managerTree.expandChildrenOf(item,true);  
				
			}

展开所有项:

protected function application1_applicationCompleteHandler(event:FlexEvent):void
{ 
for each(var item:XML in this.managerTree.dataProvider)
this.managerTree.expandChildrenOf(item,true);  

}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读