<?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>
flex linkbutton使用
最新推荐文章于 2017-05-21 12:46:00 发布