[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>
[Flex] PopUpButton系列——CornerRadius的运用的更多相关文章
- [Flex] PopUpButton系列 —— 判断下拉列表是否选中
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何利用dataDescriptor属性和is ...
- [Flex] PopUpButton系列 —— 弹出菜单的行高设置
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何通过variableRowHeight样式 ...
- [Flex] PopUpButton系列 —— 控制弹出菜单的透明度、可用、可选择状态
<?xml version="1.0" encoding="utf-8"?><!--控制弹出菜单的透明度.可用.可选择状态 PopUpButt ...
- [Flex] PopUpButton系列 —— 设置弹出菜单与主按钮之间的间隔
<?xml version="1.0" encoding="utf-8"?><!--设置弹出菜单与主按钮之间的间隔 PopUpButtonPo ...
- [Flex] PopUpButton系列 —— 打开和关闭弹出菜单
<?xml version="1.0" encoding="utf-8"?><!--响应打开和关闭弹出菜单的例子 PopUpButtonOpe ...
- [Flex] PopUpButton系列 —— 添加按钮图标
<?xml version="1.0" encoding="utf-8"?><!--为主按钮添加默认图标 PopUpButtonIcon.mx ...
- [Flex] PopUpButton系列 —— 将DataGrid作为弹出内容
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何创建一个可以弹出DataGrid作为菜单的 ...
- [Flex] Accordion系列-Header的运用
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——皮肤和外观设置
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
随机推荐
- EntityFramework5.0CodeFirst全面学习
Code First 约定 借助 CodeFirst,可通过使用 C# 或Visual Basic .NET 类来描述模型.模型的基本形状可通过约定来检测.约定是规则集,用于在使用 Code Firs ...
- 解决phpMyAdmin中缺少mysqli扩展的错误
- 将Xml或Json生成类的最简单方式
来源于 http://stackoverflow.com/questions/3187444/convert-xml-string-to-object
- sublime个人快捷键
ctrl+alt+f = 代码格式化(html,js) ctrl+d = 选中相同内容 alt+shift+w = 为内容添加新标签 ctrl+shift+a = 选择标签内的内容(再按一 ...
- ios 获取屏幕的属性和宽度
app尺寸,去掉状态栏 CGRect r = [ UIScreen mainScreen ].applicationFrame; r=0,20,320,460 屏幕尺寸 CGRect rx = [ U ...
- mysql row number的实现
CREATE TABLE `test_id` (`id` int(11) NOT NULL DEFAULT 0 ,`name` varchar(255) CHARACTER SET utf8 COLL ...
- sql2008 将行转为字符串, 将字符串转为行 互转
--将行转为字符串 select stuff((select top 20 ','+ QQ from dl_QQ where uiid=1 order by tim desc for xml path ...
- 【转】8张图理解Java
一图胜千言,下面图解均来自Program Creek 网站的Java教程,目前它们拥有最多的票选.如果图解没有阐明问题,那么你可以借助它的标题来一窥究竟. 1.字符串不变性 下面这张图展示了这段代码做 ...
- 样本方差:为嘛分母是n-1
在样本方差计算式中,我们使用Xbar代替随机变量均值μ. 容易证明(参考随便一本会讲述样本方差的教材),只要Xbar不等于μ,sigma(Xi-Xbar)2必定小于sigma(Xi-μ)2. 然而,要 ...
- android学习笔记四
TextView.Button.CheckBox.RadoiButton.EditView.ImageButton.ToogleButton——略 AnalogClock.DigitalClock = ...