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

Flex TabNavigator页间跳转

发布时间:2020-12-15 04:45:38 所属栏目:百科 来源:网络整理
导读:protected function gotoCustomerDetails():void{//法一:通过循环遍历寻找,然后跳转for each (var childTab:VBox in tabNav.getChildren()){ if(childTab.label == "页面三"){//只是通过标签名字判断.如果一样就直接打开标签. tabNav.selectedIndex = tabN
protected function gotoCustomerDetails():void{
	//法一:通过循环遍历寻找,然后跳转
	for each (var childTab:VBox in tabNav.getChildren()){   
		if(childTab.label == "页面三"){//只是通过标签名字判断.如果一样就直接打开标签.   
			tabNav.selectedIndex = tabNav.getChildIndex(childTab);
		}   
	} 
	//法二:直接跳转
	tabNav.selectedIndex=2;
	
}
<mx:TabNavigator id="tabNav" styleName="TabNavigator" width="100%" height="100%" change="tabNav_changeHandler(event)">
	
	<!--页面一-->
	<mx:VBox label="页面一" width="100%" height="100%">
		<mx:ApplicationControlBar width="100%" styleName="topBar" height="35" paddingTop="5" paddingBottom="5">
			<mx:HBox cornerRadius="5">
				<mx:Label text="数据周期:" styleName="myLabel" fontSize="12"/>
				<calendar:MonthField id="predictMonth" styleName="myCalender" />
				<mx:Button label="查 询" width="66" height="24" styleName="myButton" click="searchClick()"/>
				<mx:Button label="接触偏好分析" width="106" height="24" styleName="myButton" click="gotoChannelPreferences()"/>
				<mx:Button label="客户明细查看" width="106" height="24" styleName="myButton" click="gotoCustomerDetails()"/>
			</mx:HBox>
		</mx:ApplicationControlBar>
		
	</mx:VBox>
	
	
	<!--页面二-->
	<mx:VBox label="页面二" width="100%" height="100%">
		<mx:ApplicationControlBar width="100%" styleName="topBar" height="35" paddingTop="5" paddingBottom="5">
			<mx:HBox cornerRadius="5">
				<mx:Label text="数据周期:" styleName="myLabel" fontSize="12"/>
				<calendar:MonthField id="actionMonth" styleName="myCalender" />
			</mx:HBox>
		</mx:ApplicationControlBar>
	</mx:VBox>
	
	
	<!--页面三-->
	<mx:VBox label="页面三" width="100%" height="100%">
		<mx:ApplicationControlBar width="100%" styleName="topBar" height="70" paddingTop="5" paddingBottom="5">
		</mx:ApplicationControlBar>
		
		
	</mx:VBox>
</mx:TabNavigator>

(编辑:李大同)

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

    推荐文章
      热点阅读