<?xml version="1.0" encoding="utf-8"?>
<!--Flex中如何给Accordion的各个头部文字设置不同颜色的例子-->
<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">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent; protected function accordion_creationCompleteHandler(event:FlexEvent):void
{
accordion.getHeaderAt(0).setStyle("color", "red");
accordion.getHeaderAt(1).setStyle("color", "haloOrange");
accordion.getHeaderAt(2).setStyle("color", "yellow");
accordion.getHeaderAt(3).setStyle("color", "haloGreen");
accordion.getHeaderAt(4).setStyle("color", "haloBlue");
} ]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
mx|Accordion {
headerStyleName:accheader;
}
.accheader{
fillColors:haloSilver, haloBlue;
fillAlphas:1,0.5;
selectionColor:black;
textRollOverColor:white;
textSelectedColor:white;
chromeColor:black; } </fx:Style>
<mx:Accordion id="accordion" openDuration="250" width="300" height="200" creationComplete="accordion_creationCompleteHandler(event)">
<mx:VBox label="Red" />
<mx:VBox label="Orange" />
<mx:VBox label="Yellow" />
<mx:VBox label="Green" />
<mx:VBox label="Blue" />
</mx:Accordion>
</s:Application>

[Flex] Accodion系列 - Header文本颜色设置的更多相关文章

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

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

  2. python基础练习题(题目 文本颜色设置)

    day23 --------------------------------------------------------------- 实例035:设置输出颜色 题目 文本颜色设置. 分析:不会, ...

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

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

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

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

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

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

  6. flex 4 datagrid 奇偶行颜色设置

    <s:DataGrid width="100%" height="100%" alternatingRowColors="[#ffFFff,#e ...

  7. Linux终端提示符颜色设置

    将以下语句添加到用户目录下的 .bashrc 文件中,然后执行 source .bashrc 使其立即生效. PS1='${debian_chroot:+($debian_chroot)}\[\033 ...

  8. 【MFC系列】MFC快速设置控件文本字体、大小、颜色、背景

    以静态文本为例,分享一下怎么修改文本字体.大小.颜色.背景等参数.其他文本.控件等可参照修改. 1.修改字体.大小 这个很简单,首先在Dlg类中声明一个CFont类型的成员变量: 然后在类的初始化函数 ...

  9. 在Visual Studio 2012 Blue theme下使用Dark theme的文本编辑器颜色设置

    Visual Studio 2012 默认提供了3种color theme: blue,light,和dark.其中dark的文本编辑器颜色设定很爽,可是整个菜单项加上一些小的窗口如Find Resu ...

随机推荐

  1. SqlServer中quotename用法与实例

    语法 QUOTENAME ( 'character_string' [ , 'quote_character' ] ) 参数 'character_string' Unicode 字符数据构成的字符串 ...

  2. 07-Java 中的IO操作

    1.Java IO简介: (1)I/O :in \out 即输入与输出.基本功能:读写. (2)IO流:作用:读写设备上的数据,硬盘文件.内存.键盘.网络-- 根据数据的走向,可分为:输入流.输出流. ...

  3. JSP 相关试题(五)

    Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 /* Style Definiti ...

  4. unity, sceneview 中拾取球体gizmos

    http://answers.unity3d.com/questions/745560/handle-for-clickable-scene-objects.html http://www.jians ...

  5. unity, Graphics.Blit (null, null, mat,0);

    我使用 Graphics.Blit (null, finalRT, mat); 合成出一张finalRT,然后将finalRT用在editor脚本的OnInspector中使用 Graphics.Dr ...

  6. spring的ResultSetWrappingSqlRowSet使用rs.getTimestamp取oracle数据库时分秒问题

    oracle 11G数据库使用ojdbc14.jar驱动 rs.getTimestamp取不出时分秒问题: ResultSetWrappingSqlRowSet rs = processDao.que ...

  7. SQL集合运算参考及案例(一):列值分组累计求和

    概述 目前企业应用系统使用的大多数据库都是关系型数据库,关系数据库依赖的理论就是针对集合运算的关系代数.关系代数是一种抽象的查询语言,是关系数据操纵语言的一种传统表达方式.不过我们在工作中发现,很多人 ...

  8. MySQL5.7.13源码编译安装指南(转)

    系统 CenterOs 6.5 1.安装依赖包(cmake make gcc等,其实好多都有了,不需要更新,为了防止世界被破坏,就装下) yum install gcc gcc-c++ -yyum i ...

  9. Android 中Fragment使用

    Android 中Fragment使用 public class MainActivity extends Activity { public static String[] array = { &q ...

  10. oc-数据模型的建立

    @{@"name":@"David Beckham",@"age":@38,@"gender":@"男&quo ...