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

flex linkbutton使用

发布时间:2020-12-15 05:07:00 所属栏目:百科 来源:网络整理
导读:?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"mx:Script![CDATA[import mx.events.MenuEvent;import mx.controls.Alert;//处理所有linkbar的点击事件private function show(str:String)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	<mx:Script>
		<![CDATA[
			import mx.events.MenuEvent;
			import mx.controls.Alert;

			//处理所有linkbar的点击事件
			private function show(str:String):void
			{
				switch (str)
				{
					case "学生管理":
					Alert.show("学生管理");
						break;
					case "课程管理":
						Alert.show("课程管理");
						break;
					case "成绩管理":
						Alert.show("成绩管理");
						break;
				}
			}

		]]>
	</mx:Script>
	<mx:VBox x="0"
			 y="0"
			 width="100%"
			 height="100%"
			 verticalGap="0">
		<mx:HBox width="100%"
				 height="50"
				 id="title_box">
			<mx:Label text="学生管理"
					  fontSize="30"/>
		</mx:HBox>
		<mx:HRule width="100%"
				  height="1"/>
		<mx:HBox width="100%"
				 height="30"
				 id="meun_box">
			<mx:VRule height="100%"
					  width="1"/>
			<mx:LinkBar itemClick="show(String(event.label))"
						width="100%"
						fontSize="15">
				<mx:dataProvider>
					<mx:String>学生管理</mx:String>
					<mx:String>课程管理</mx:String>
					<mx:String>成绩管理</mx:String>
				</mx:dataProvider>
			</mx:LinkBar>
			<mx:VRule height="100%"
					  width="1"/>
		</mx:HBox>
		<mx:HRule width="100%"
				  height="1"/>
	</mx:VBox>
</mx:Application>

(编辑:李大同)

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

    推荐文章
      热点阅读