[Flex] PopUpButton系列——CornerRadius的运用

编程入门 行业动态 更新时间:2024-10-24 20:22:25

[Flex] PopUpButton<a href=https://www.elefans.com/category/jswz/34/1770787.html style=系列——CornerRadius的运用"/>

[Flex] PopUpButton系列——CornerRadius的运用

<?xml version="1.0" encoding="utf-8"?>
<!--设置主按钮圆角半径 PopUpButtonCornerRadius.mxml-->
<s:Application xmlns:fx="" xmlns:s="library://ns.adobe/flex/spark" xmlns:mx="library://ns.adobe/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/flex/spark";@namespace mx "library://ns.adobe/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>

 

转载于:.html

更多推荐

[Flex] PopUpButton系列——CornerRadius的运用

本文发布于:2024-02-17 15:07:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1694466.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:系列   Flex   PopUpButton   CornerRadius

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!