[Flex] ButtonBar系列——皮肤和外观设置
<?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系列——皮肤和外观设置的更多相关文章
- [Flex] ButtonBar系列——flex3 皮肤和外观设置
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——最后一个项目的样式设置
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——简单布局
<?xml version="1.0" encoding="utf-8"?> <!--通过layout属性,设置ButtonBar布局--&g ...
- [Flex] Accodion系列 - Header文本颜色设置
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何给Accordion的各个头部文字设置不同 ...
- [Flex] Accordion系列 - Header图标的设置
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何通过getHeaderAt()函数以及se ...
- [Flex] ButtonBar系列——垂直布局
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——labelFunction用户提供的函数,在每个项目上运行以确定其标签
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——控制ButtonBar菜单是否可用
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——arrowKeysWrapFocus属性如果为 true,则使用箭头键在组件内导航时,如果击中某一端则将折回。
<?xml version="1.0" encoding="utf-8"?> <!--arrowKeysWrapFocus 如果为 true, ...
随机推荐
- linux 安装phpMyAdmin
1. 首先安装 php mysql nginx 2. 下载phpMyadmin wget http://sourceforge.net/projects/phpmyadmin/files/phpM ...
- Web前端开发笔试&面试_05
>>CW 1.JavaScript的2种变量范围有什么不同? 2.JavaScript 的对象有哪些? 3.
- unity, monodevelop 不安全的代码只会在使用/unsafe编译的情况下出现
http://blog.sina.com.cn/s/blog_6b3661a90102wx2g.html
- nginx windows 版 创建windows 服务
使用的工具 Windows Service Wrapper 使用的指令 nginx -s top Windows Service Wrapper 工具的使用: 1. 定义xml 文件: 说明如下: ...
- Nancy 简单学习
1. 环境 vs2010 , nancy 2. 需要测试的功能 1. 输出 页面输出简单文本 2. 输出json 数据 3. 操作 1. 创建asp.net 空项目 2. 添加引用Nancy库 使用n ...
- Storyboard里面的几种Segue区别及视图的切换:push,modal,popover,replace和custom
一.视图切换类型介绍 在storyboard中,segue有几种不同的类型,在iphone和ipad的开发中,segue的类型是不同的. 在iphone中,segue有:push,modal,和cus ...
- fetch用法
fetch(REQUEST_URL) .then((response) => response.json()) .then((responseData)=> { console.log(r ...
- Python文件处理之文件写入方式与写缓存(三)
Python的open的写入方式有: write(str):将str写入文件 writelines(sequence of strings):写多行到文件,参数为可迭代对象 首先来看下writelin ...
- Why doesn't Genymotion run on Windows 10?
To date, VirtualBox is not yet fully compatible with Windows 10. As Genymotion relies on the use of ...
- [结]Oracle trigger(触发器)摘录
1.触发器: 是许多关系数据库系统都提供的一项技术.在ORACLE系统里,触发器类似过程和函数,都有声明,执行和异常处理过程的PL/SQL块. 触发器在数据库里以独立的对象存储,它与存储过程和函数不同 ...