<?xml version="1.0" encoding="utf-8"?>
<!--Flex中如何通过getHeaderAt()函数以及selectedUpIcon,selectedOverIcon和selectedDownIcon样式给Accordion头部设置一个分割用图标的例子-->
<s:Application name="Accordion_getHeaderAt_selectedUpIcon_test"
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">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.controls.Button; [Embed("assets/bullet_red.png")]
private const RedIcon:Class; [Embed("assets/bullet_orange.png")]
private const OrangeIcon:Class; [Embed("assets/bullet_yellow.png")]
private const YellowIcon:Class; [Embed("assets/bullet_green.png")]
private const GreenIcon:Class; [Embed("assets/bullet_blue.png")]
private const BlueIcon:Class; [Embed("assets/bullet_star.png")]
private const StarIcon:Class; protected function accordion_creationCompleteHandler(event:FlexEvent):void
{
var idx:uint;
var len:uint = accordion.numChildren;
var btn:Button;
for (idx=0; idx<len; idx++) {
btn = accordion.getHeaderAt(idx);
btn.useHandCursor = true;
btn.buttonMode = true;
btn.setStyle("selectedUpIcon", StarIcon);
btn.setStyle("selectedOverIcon", StarIcon);
btn.setStyle("selectedDownIcon", StarIcon);
} } ]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<mx:Accordion id="accordion" openDuration="250" width="100%" height="100%" creationComplete="accordion_creationCompleteHandler(event)">
<mx:VBox id="redVbox" label="Red" icon="{RedIcon}" />
<mx:VBox id="orangeVbox" label="Orange" icon="{OrangeIcon}" />
<mx:VBox id="yellowVbox" label="Yellow" icon="{YellowIcon}" />
<mx:VBox id="greenVbox" label="Green" icon="{GreenIcon}" />
<mx:VBox id="blueVbox" label="Blue" icon="{BlueIcon}" />
</mx:Accordion>
</s:Application>

[Flex] Accordion系列 - Header图标的设置的更多相关文章

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

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

  2. [Flex] Accordion系列 - Header背景图的设置

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

  3. [Flex] Accordion系列-Header的运用

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

  4. [Flex] Accordion系列-动态添加或删除Accordion容器中项目

    <?xml version="1.0" encoding="utf-8"?> <!--Flex中如何使用addChild()和removeCh ...

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

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

  6. 【ABAP系列】SAP Smartforms 设置纸张打印格式

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP Smartforms 设 ...

  7. php的header()函数之设置content-type

    //定义编码 header( 'Content-Type:text/html;charset=utf-8 '); //Atom header('Content-type: application/at ...

  8. C#项目打包后安装的桌面快捷方式图标怎么设置成自己想要的图标

    #项目打包后安装的桌面快捷方式图标怎么设置成自己想要的图标 2012-08-25 09:11匿名 | 浏览 3286 次  C#编程 C#项目用vs2005自带的工具打包后安装的桌面快捷方式图标怎么设 ...

  9. php的header函数之设置content-type

    //定义编码 header( 'Content-Type:text/html;charset=utf-8 '); //Atom header('Content-type: application/at ...

随机推荐

  1. 【转】关于PHP的header("P3P: CP=CURa……")

    对于IE来说(默认安全级别下),iframe.img.link等标签都是只发送session cookie(又叫 第一方cookie),拦截本地cookie发送(又叫第三方cookie).当这些标签跨 ...

  2. 【转】object标签和embed标签

    我们现在大部分人做网页,都是直接用DW插入flash,而且DW也是所见即所得,直接生成了相应的flash显示代码.可是我们又有多少人了解这些直接由DW生成的代码呢?其实我接触flash player标 ...

  3. SpringMVC+Apache Shiro+JPA(hibernate)

    http://my.oschina.net/moziqi/blog/305412 http://my.oschina.net/miger/blog/283526 spring4.1.0+spring ...

  4. Javax.mail.NoSuchProviderException: smtp

    UT 这个错误是因为缺jar包 下载地址:在oralce下载一个 JavaMail 包 http://www.oracle.com/technetwork/java/javamail/index-13 ...

  5. C语言qsort函数用法

    qsort函数简介 排序方法有很多种:选择排序,冒泡排序,归并排序,快速排序等. 看名字都知道快速排序是目前公认的一种比较好的排序算法.因为他速度很快,所以系统也在库里实现这个算法,便于我们的使用. ...

  6. 如何利用RMAN Debug和10046 Trace来诊断RMAN问题?

    学习转摘:https://blogs.oracle.com/Database4CN/entry/%E5%A6%82%E4%BD%95%E5%88%A9%E7%94%A8rman_debug%E5%92 ...

  7. Effective Java 学习笔记----第7章 通用程序设计

    第7章 通用程序设计 第29条 将局部变量的作用域最小化     使一个局部变量的作用域最小化,最有力的技术室在第一次使用它的地方声明.   第30条 了解和使用库      效率提高.如果你不知道库 ...

  8. CentOS下用pyenv 和 virtualenv 搭建单机多版本python 虚拟开发环境

    安装 系统环境:CentOS 6.5 安装依赖 yum -y install gcc gcc-c++ make git patch openssl-devel zlib-devel readline- ...

  9. C#读取系统信息

    using System; using System.Management; namespace Soyee.Comm { /// <summary> /// Computer Infor ...

  10. Linux下查看进程打开的文件句柄数和如何修改

    修改文件句柄数在Linux下,我们使用ulimit -n 命令可以看到单个进程能够打开的最大文件句柄数量(socket连接也算在里面).系统默认值1024. 对于一般的应用来说(象Apache.系统进 ...