<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.ItemClickEvent;
function click(event:ItemClickEvent):void
{
Alert.show(event.label);
}
]]>
</mx:Script>
<mx:ButtonBar horizontalGap="5" fontSize="14" itemClick="click(event)" x="198" y="156">
<mx:dataProvider>
<mx:Array><mx:String>首 页</mx:String>
<mx:String>公司新闻</mx:String>
<mx:String>企业荣誉</mx:String>
<mx:String>成功案例</mx:String>
<mx:String>联系我们</mx:String>
</mx:Array>
</mx:dataProvider>
</mx:ButtonBar>
</mx:Application>
buttonbar按钮条使用方法
最新推荐文章于 2023-11-07 18:30:00 发布
本文展示了一个使用Adobe Flex框架创建的ButtonBar组件示例。该示例通过定义一个包含多个选项(如首页、公司新闻等)的ButtonBar,并为每个按钮配置了点击事件来显示对应的标签文本。此外,还介绍了如何利用MXML进行布局设置和事件处理。
395

被折叠的 条评论
为什么被折叠?



