1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  3. layout="vertical"
  4. verticalAlign="middle"
  5. backgroundColor="white">
  6.  
  7. <mx:Style>
  8. .allButtons2 {
  9. /* Creates a gradient from red/orange when button is in the
  10. "out" state. */
  11. fillColors: red, haloOrange;
  12. }
  13.  
  14. .allButtons4 {
  15. /* Creates a gradient from red/orange when button is in the
  16. "out" state. Creates a gradient from green/blue when
  17. button is in the "over" state. */
  18. fillColors: red, haloOrange, haloGreen, haloBlue;
  19. }
  20.  
  21. .allButtonsSolid {
  22. fillColors: red, red;
  23. }
  24.  
  25. .allButtonsSolidOpaque {
  26. fillAlphas: 1.0, 1.0;
  27. fillColors: red, red;
  28. }
  29. </mx:Style>
  30.  
  31. <mx:ViewStack id="viewStack"
  32. visible="false"
  33. includeInLayout="false">
  34. <mx:VBox label="One">
  35. <mx:Label text="One" />
  36. </mx:VBox>
  37. <mx:VBox label="Two">
  38. <mx:Label text="Two" />
  39. </mx:VBox>
  40. <mx:VBox label="Three">
  41. <mx:Label text="Three" />
  42. </mx:VBox>
  43. </mx:ViewStack>
  44.  
  45. <mx:Form>
  46. <mx:FormItem label="2 fill colors defined:">
  47. <mx:ButtonBar id="buttonBar2"
  48. buttonStyleName="allButtons2"
  49. dataProvider="{viewStack}" />
  50. </mx:FormItem>
  51. <mx:FormItem label="4 fill colors defined:">
  52. <mx:ButtonBar id="buttonBar4"
  53. buttonStyleName="allButtons4"
  54. dataProvider="{viewStack}" />
  55. </mx:FormItem>
  56. <mx:FormItem label="solid fill:">
  57. <mx:ButtonBar id="buttonBarSolid"
  58. buttonStyleName="allButtonsSolid"
  59. dataProvider="{viewStack}" />
  60. </mx:FormItem>
  61. <mx:FormItem label="solid opaque fill:">
  62. <mx:ButtonBar id="buttonBarSolidOpaque"
  63. buttonStyleName="allButtonsSolidOpaque"
  64. dataProvider="{viewStack}" />
  65. </mx:FormItem>
  66. </mx:Form>
  67.  
  68. </mx:Application>

[Flex] ButtonBar系列——flex3 ButtonBar样式之颜色的填充的更多相关文章

  1. [Flex] ButtonBar系列——flex3 ButtonBar属性labelPlacement标签相对于指定图标的方向

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

  2. [Flex] ButtonBar系列——flex3 ButtonBar各项之间的间距调整

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

  3. [Flex] ButtonBar系列——flex3 ButtonBar圆角菜单的运用

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

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

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

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

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

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

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

  7. CSS系列——浏览器默认样式

    了解HTML标签在各浏览器当中的默认样式,可以让我们了解,为什么会要写Reset.css,Reset.css当中要怎么写样式最合理.试着思考下面的问题: 为什么会有默认样式? 每个浏览器的默认样式有什 ...

  8. UITabBarController 、TabBar背景颜色设置,UITabBarItem的文字样式(颜色和大小)UITabBarItem的位置调整

    改变UITabBarController的颜色 UIView*mView=[[UIView alloc]initWithFrame:CGRectMake(0,0,320,48)];//这是部分tabb ...

  9. [Flex] PopUpButton系列 —— 弹出菜单的行高设置

    <?xml version="1.0" encoding="utf-8"?> <!--Flex中如何通过variableRowHeight样式 ...

随机推荐

  1. 使用JavaScript 实现注册表单的校验

    说明:在点击提交时进行表单校验,具体要求如下: 1)用户名为3~16个字符,且不能包含”@”和”#”字符: 2)密码和校验密码必须一致,且长度在8个字符到16个字符: 3)兴趣爱好至少选择一项: 4) ...

  2. 【转】图解CSS的padding,margin,border属性(详细介绍及举例说明)

    W3C组织建议把所有网页上的对像都放在一个盒(box)中,设计师可以通过创建定义来控制这个盒的属性,这些对像包括段落.列表.标题.图片以及层.盒模型主要定义四个区域:内容(content).边框距(p ...

  3. HtmlEncode、HtmlDecode、UrlEncode、UrlDecode

    HtmlEncode: 将 Html 源文件中不允许出现的字符进行编码.例如:"<".">"."&" 等. HtmlDe ...

  4. AngularJS 的安全Apply

    $scope.safeApply = function(fn) {     var phase = this.$root.$$phase;     if (phase == ‘$apply‘ || p ...

  5. Oracle中的不等于号

    今天碰到一个Oracle不等于的问题,最后搜索了一下,发现下面资料,拿来跟大家分享一下   关于Oracle中的不等于号: 在Oracle中, <> != ~= ^= 都是不等于号的意思. ...

  6. winrar 5.21去广告

    http://www.rarlab.com/ 把下面的数据复制到“记事本”中,用文件名“rarreg.key搜索”命名该文件,保存到winrar安装文件夹即完成注册 RAR registration ...

  7. ASP.NET MVC 程序 报错“CS0012: 类型“System.Data.Objects.DataClasses.EntityObject”在未被引用的程序集中定义”的解决办法

    运行MVC程序,具体报错信息如下: 解决方法: 打开Web.config在assemblies下加入<add assembly="System.Data.Entity, Version ...

  8. 深入理解ThreadLocal

    ThreadLocal是什么 早在JDK 1.2的版本中就提供java.lang.ThreadLocal,ThreadLocal为解决多线程程序的并发问题提供了一种新的思路.使用这个工具类可以很简洁地 ...

  9. R提高篇(四): 数据管理二

    目录: 数学函数 统计函数 应用示例 控制流 数学函数 ceiling(x):  大于等于 x  的最小整数, 如:  ceiling(3.213)  --> 4 floor(x):     小 ...

  10. android ANR

    下面有两篇关于Android ANR的文章,感觉不错,分享一下! [Android实例] [Sundy系列]网上绝无仅有的Log分析教程及例子!android ANRhttp://blog.csdn. ...