不多说,直接上代码
<?xml version="1.0" encoding="utf-8"?>
<!-- http://www.myflexhero.com/share/flex-hero-flex4/flex-hero-components/flex-hero-ui-components/flex-hero-buttonbar/626 -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
viewSourceURL="srcview/index.html">
<fx:Declarations>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.controls.Alert;
[Bindable]
[Embed(source="assets/toolbaricon/Enlarge.png")]
public var EnlargeIcon:Class;
[Bindable]
[Embed(source="assets/toolbaricon/Narrow.png")]
public var NarrowIcon:Class;
protected function buttonBar_clickHandler(event:MouseEvent):void
{
var msg:String = "[" + buttonBar.selectedIndex + "] " + buttonBar.selectedItem.label;
Alert.show(msg);
}
private function setToolBarButtonIcon(item:Object):Class
{
var tn:Object = item;
if(tn.icon == "Enlarge")
return EnlargeIcon;
else if(tn.icon == "Narrow")
return NarrowIcon;
}
]]>
</fx:Script>
<s:ButtonBar id="buttonBar" iconFunction="setToolBarButtonIcon" click="buttonBar_clickHandler(event)" >
<s:ArrayCollection>
<fx:Object name="enlargeButton" label="放大" icon="Enlarge"/>
<fx:Object name="narrowButton" label="缩小" icon="Narrow"/>
</s:ArrayCollection>
</s:ButtonBar>
</s:Application>
分享到:
相关推荐
NULL 博文链接:https://chenhailong.iteye.com/blog/1915623
关于Button 的使用,还有一些第方控件,有兴趣者可以拿来研究研究...
内含Janus.Windows.UI.v4.dll、Janus.Windows.TimeLine.v4.dll、Janus.Windows.Schedule.v4.dll、Janus.Windows.Ribbon.v4.dll、Janus.Windows....Windows.CalendarCombo.v4.dll、Janus.Windows.ButtonBar.v4.dll...
DevPower-buttonbar.zip
本文实例讲述了Android编程实现将ButtonBar放在屏幕底部的方法。分享给大家供大家参考,具体如下: 前面一篇《Android编程实现将tab选项卡放在屏幕底部的方法》提到ButtonBar的方式写底部button,试了试,看起来外观...
Button | ButtonBar | TabBar | ToggleButton | CheckBox | RadioButton | Scroller | HScrollBar VScrollBar | HSlider | VSlider | DropDownList | TextArea | TextInput | ComboBox | List NumericStepper | ...
此资源是关于移动端框架Flutter(基于Android)的一些常见组件的介绍,包括PPT讲义及源码示例。 此资源介绍的相关内容有:按钮组件 RaisedButton、FlatButton、OutlineButton、IconButton、ButtonBar以及自定义按钮...
bsfd皮肤资源修改bsfd皮肤资源修改bsfd皮肤资源修改
角度按钮栏 Hey there.. this is nothing, but a simple button bar that charms your data It simply contains two attribute. one is 'source' and another one is 'options'.'source' is array of data, that can...
在 Flutter 里有很多的 Button,包括了:MaterialButton、RaisedButton、FloatingActionButton、FlatButton、IconButton、ButtonBar、DropdownButton 等。 一般常用的 Button 是 MaterialButton、IconButton、...
整套janus动态链接库dll:Janus Windows ButtonBar v3 dll Janus Windows Common v3 dll Janus Windows UI v3 dll
在ButtonBar中的脚本,需要使用\n来打上回车 4>下面是一个登陆自动处理例子: >>> "# " cd /home/L >>> "# " cd myproject >>> "# " make rebuild 上面例子的意思是,登陆后,定位到自己的开发工程目录,然后执行...
自己研究总结的方法,包括所缺的控件,一般不会缺少的
style TextAppearance_AppCompat_Display4 style TextAppearance_AppCompat_Headline style TextAppearance_AppCompat_Inverse style TextAppearance_AppCompat_Large style TextAppearance_AppCompat_Large_Inverse...
有点类似IPhone里的布局了,呵呵~(其实后来发现这个应该不是用TAB做的,而是ButtonBar做出来的吧,或者是他重写了TAB?总之不是简单地将TAB放置底端了)。 要放置底端,那么Android自带的例程是不可以做到的(例程...
? ? ? 圯 咣曹 苒 鄄苘 苘 捋圯 苘懿圻 卟圹圹圹鄄 苘懿圹坜圹曹苘 懿圹? 苘苘槽圯哌圹苘 哌卟圹圹圹圹 槽?圹圹鄄咣圹坜圹哌槽圹?...圹圹哌咣圹蒇圹 卟鄄苘 ... (TM) similar to the Windows Explorer....