zoukankan      html  css  js  c++  java
  • [Flex] PopUpButton系列 —— 控制弹出菜单的透明度、可用、可选择状态

    <?xml version="1.0" encoding="utf-8"?>
    <!--控制弹出菜单的透明度、可用、可选择状态 PopUpButtonPopUpTranslucent.mxml -->
    <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.controls.Menu; import mx.events.FlexEvent; private var menu:Menu; protected function popUpButton_initializeHandler(event:FlexEvent):void { } protected function popUpButton_creationCompleteHandler(event:FlexEvent):void { menu = new Menu(); menu.labelField = "@label"; menu.dataProvider = xmlList; popUpButton.popUp = menu; menu.width = popUpButton.width; } ]]> </fx:Script> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> <fx:Array id="arr"> <fx:Object label="《霹雳先锋》香港票房8916612" actor="Steven Chow"/> <fx:Object label="《捕风汉子》香港票房3149395" actor="Steven Chow"/> <fx:Object label="《小偷阿星》香港票房7968106 " actor="Steven Chow"/> <fx:Object type="separator"/> <fx:Object label="笑傲江湖之东方不败(1992)" type="check" actor="Jet Li"/> <fx:Object label="精武英雄(1994)" type="radio" actor="Jet Li"/> <fx:Object label="给爸爸的信(1995)" actor="Jet Li"/> </fx:Array> <fx:XMLList xmlns="" id="xmlList"> <node label="《霹雳先锋》香港票房8916612" type="radio" toggled="true" /> <node label="《捕风汉子》香港票房3149395"> <node label="child item" /> </node> <node label="《小偷阿星》香港票房7968106" /> <node type="separator" /> <node label="笑傲江湖之东方不败(1992)" type="check" toggled="true" /> <node label="精武英雄(1994)" /> <node label="给爸爸的信(1995)" enabled="false" /> </fx:XMLList> </fx:Declarations> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; mx|PopUpButton { popUpStyleName: myCustomPopUpStyleName; } /* mx|Menu{ fontWeight: normal; textAlign: left; chromeColor: blue; contentBackgroundAlpha:0.4; contentBackgroundColor:white; borderStyle: solid; } */ .myCustomPopUpStyleName { fontWeight: normal; textAlign: center; contentBackgroundAlpha:0.4; contentBackgroundColor:white; borderStyle: solid; } </fx:Style> <s:controlBarContent> <mx:PopUpButton id="popUpButton" label="Please select an item..." openAlways="true" initialize="popUpButton_initializeHandler(event)" creationComplete="popUpButton_creationCompleteHandler(event)" /> </s:controlBarContent> <s:BorderContainer backgroundAlpha="0.5" backgroundColor="haloSilver" width="100%" height="100%" /> </s:Application>
  • 相关阅读:
    二维数组 A[m][n] 按行优先和按列优先的 下标地址转换公式
    服务器的公网ip 和内网ip
    剑指offer 23.二叉搜索树的后序遍历序列
    剑指offer 22. 从上往下打印二叉树 & 102. 二叉树的层序遍历
    剑指offer 21.栈的压入、弹出序列 & leetcode 剑指 Offer 31. 栈的压入、弹出序列
    剑指offer 4. 重建二叉树 & leetcode 剑指 Offer 07. 重建二叉树 & leetcode hot 100 105. 从前序与中序遍历序列构造二叉树
    Linux配置Nginx+Tomcat负载均衡
    yum安装apache及问题解决
    Linux高级文本处理命令
    JMeter:生成漂亮的多维度的HTML报告
  • 原文地址:https://www.cnblogs.com/frost-yen/p/5195361.html
Copyright © 2011-2022 走看看