zoukankan      html  css  js  c++  java
  • [Flex] PopUpButton系列——CornerRadius的运用

    <?xml version="1.0" encoding="utf-8"?>
    <!--设置主按钮圆角半径 PopUpButtonCornerRadius.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; protected function popUpButton_initializeHandler(event:FlexEvent):void { var menu:Menu = new Menu(); menu.dataProvider = arr; popUpButton.popUp = menu; } protected function resizePopUp(event:FlexEvent):void { popUpButton.popUp.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)" actor="Jet Li"/> <fx:Object label="精武英雄(1994)" actor="Jet Li"/> <fx:Object label="给爸爸的信(1995)" actor="Jet Li"/> </fx:Array> </fx:Declarations> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; mx|PopUpButton { popUpStyleName: myCustomPopUpStyleName; } .myCustomPopUpStyleName { fontWeight: normal; textAlign: left; leftIconGap: 0; } </fx:Style> <s:controlBarContent> <s:Form styleName="plain"> <s:FormItem label="cornerRadius:"> <!--<s:HSlider id="slider" minimum="0" maximum="{popUpButton.height/2}" value="0" liveDragging="true" snapInterval="1" />--> <mx:HSlider id="slider" minimum="0" maximum="{10}" value="0" liveDragging="true" snapInterval="1" tickInterval="1" /> </s:FormItem> </s:Form> </s:controlBarContent> <mx:PopUpButton id="popUpButton" label="Please select an item..." cornerRadius="{slider.value}" arrowButtonWidth="{popUpButton.height}" openAlways="true" initialize="popUpButton_initializeHandler(event)" creationComplete="resizePopUp(event)"/> </s:Application>
  • 相关阅读:
    myshop-dubbo 版图床
    Dockerfile里执行RUN chown 不起作用?
    The currently defined JAVA_HOME (/usr/local/openjdk-11) refers to a location where java was found but jstack was not found
    随机森林
    K-mean和K-mean++
    机器学习之特征选择
    聚类---度量
    机器学习之降维方法
    机器学习之生成模型和判别模型
    EM相关两个算法 k-mean算法和混合高斯模型
  • 原文地址:https://www.cnblogs.com/frost-yen/p/5195274.html
Copyright © 2011-2022 走看看