<?xml version="1.0" encoding="utf-8"?>
<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" minWidth="955" minHeight="600">
<s:layout>
<s:VerticalLayout gap="3" />
</s:layout>
<fx:Script>
<![CDATA[
import mx.collections.ArrayList; /* import spark.components.ButtonBarButton; */
import mx.controls.buttonBarClasses.ButtonBarButton;
private function toggleButton(idx:uint, selected:Boolean):void {
var b3:ButtonBarButton = buttonBar.getChildAt(idx) as ButtonBarButton;
b3.enabled = selected;
} ]]>
</fx:Script> <fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<fx:Array id="arr">
<fx:Object label="Button"/>
<fx:Object label="ButtonBar"/>
<fx:Object label="ColorPicker"/>
<fx:Object label="ComboBox"/>
</fx:Array>
</fx:Declarations>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
mx|ButtonBar{
buttonStyleName:myCustomButtonStyleName;
}
.myCustomButtonStyleName{
cornerRadius:10;
}
</fx:Style>
<s:controlBarContent>
<s:Form styleName="plain">
<s:FormItem label="Button enabled:" height="20">
<s:CheckBox id="che1" selected="true" click="toggleButton(0,che1.selected)"/>
</s:FormItem>
<s:FormItem label="ButtonBar enabled:" height="20">
<s:CheckBox id="che2" selected="true" click="toggleButton(1,che2.selected)"/>
</s:FormItem>
<s:FormItem label="ColorPicker enabled:" height="20">
<s:CheckBox id="che3" selected="true" click="toggleButton(2,che3.selected)"/>
</s:FormItem>
<s:FormItem label="ComboBox enabled:" height="20">
<s:CheckBox id="che4" selected="true" click="toggleButton(3,che4.selected)"/>
</s:FormItem>
</s:Form> </s:controlBarContent>
<mx:ButtonBar id="buttonBar" dataProvider="{arr}" itemClick="lbl.text = event.label" />
<s:Label id="lbl"/>
</s:Application>

[Flex] ButtonBar系列——皮肤和外观设置的更多相关文章

  1. [Flex] ButtonBar系列——flex3 皮肤和外观设置

    <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...

  2. [Flex] ButtonBar系列——最后一个项目的样式设置

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  3. [Flex] ButtonBar系列——简单布局

    <?xml version="1.0" encoding="utf-8"?> <!--通过layout属性,设置ButtonBar布局--&g ...

  4. [Flex] Accodion系列 - Header文本颜色设置

    <?xml version="1.0" encoding="utf-8"?> <!--Flex中如何给Accordion的各个头部文字设置不同 ...

  5. [Flex] Accordion系列 - Header图标的设置

    <?xml version="1.0" encoding="utf-8"?> <!--Flex中如何通过getHeaderAt()函数以及se ...

  6. [Flex] ButtonBar系列——垂直布局

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  7. [Flex] ButtonBar系列——labelFunction用户提供的函数,在每个项目上运行以确定其标签

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  8. [Flex] ButtonBar系列——控制ButtonBar菜单是否可用

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  9. [Flex] ButtonBar系列——arrowKeysWrapFocus属性如果为 true,则使用箭头键在组件内导航时,如果击中某一端则将折回。

    <?xml version="1.0" encoding="utf-8"?> <!--arrowKeysWrapFocus 如果为 true, ...

随机推荐

  1. 026. asp.net中将图片以二进制方式保存到数据库并以HTTP流方式输出

    保存到数据库中 protected void imgbtnCreate_Click(object sender, ImageClickEventArgs e) { string PerHomeName ...

  2. 【转】第4篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:委托回调方法分析

    作者: 牛A与牛C之间 时间: 2013-11-18 分类: 技术文章 | 暂无评论 | 编辑文章 主页 » 技术文章 » 第4篇:Xilium CefGlue 关于 CLR Object 与 JS ...

  3. nginx linux 下开机自动启动

    这里使用的是编写shell脚本的方式来处理 vi /etc/init.d/nginx  (输入下面的代码) #!/bin/bash# nginx Startup script for the Ngin ...

  4. java单例模式和双例模式

    今天朋友找我给做道题,双例模式,我是没听说过,都说是单例模式和多例模式, 也不知道双例模式什么时候用,就简单写了一个案例,不知道对不对,个人感觉蛮对的,双例就是单例+单例,废话不说了!!!! /* * ...

  5. SQL Server 2008中SQL增强之三:Merge(在一条语句中使用Insert,Update,Delete) 一条语句实现两表同步(添加、删除、修改)

    MERGE 目标表 USING 源表 ON 匹配条件 WHEN MATCHED THEN 语句 WHEN NOT MATCHED THEN 语句; http://www.chinaz.com/prog ...

  6. 怎么优化JAVA程序的执行效率和性能?

    现在java程序已经够快的了,不过有时写出了的程序效率就不怎么样,很多细节值得我们注意,比如使用StringBuffer或者StringBuilder来拼接或者操作字符串就比直接使用String效率高 ...

  7. 提示“应用程序无法启动,因为应用程序的并行配置不正确”不能加载 System.Data.SQLite.dll

    新版本SQLITE,如果下载Precompiled Binaries版会出现提示“应用程序无法启动,因为应用程序的并行配置不正确”不能加载 System.Data.SQLite.dll. 下载Prec ...

  8. SPOJ #692. Fruit Farm

    Another palindrome related problem. Actually nothing too theoretical here, but please keep following ...

  9. phpstorm 配置自带webserver ,配置根目录

    版权声明:本文为博主原创文章,未经博主允许不得转载. from http://blog.csdn.net/pony_maggie/article/details/52367093   目录(?)[-] ...

  10. Python基础教程【读书笔记】 - 2016/8/3

    希望通过博客园持续的更新,分享和记录Python基础知识到高级应用的点点滴滴! 第十一波:第11章  文件和素材 本章更进一步,让程序能够接触更多的领域:文件和流.接下来介绍的函数和对象可以让你在程序 ...