[Flex] ButtonBar系列——flex3 ButtonBar属性labelPlacement标签相对于指定图标的方向
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white" > <mx:Script>
<![CDATA[
import mx.controls.Button;
import mx.controls.ButtonLabelPlacement; [Bindable]
[Embed("assets/arrow_down.png")]
private var arrowDown:Class; [Bindable]
[Embed("assets/arrow_left.png")]
private var arrowLeft:Class; [Bindable]
[Embed("assets/arrow_right.png")]
private var arrowRight:Class; [Bindable]
[Embed("assets/arrow_up.png")]
private var arrowUp:Class; private function init():void {
var idx:uint;
var len:uint = buttonBar.numChildren;
var btn:Button;
/* Loop over each button. */
for (idx = 0; idx < len; idx++) {
/* Get reference to current Button. */
btn = buttonBar.getChildAt(idx) as Button;
/* Set labelPlacement property to current item in arr Array object. */
btn.labelPlacement = arr[idx].label;
} }
]]>
</mx:Script> <mx:Array id="arr">
<mx:Object label="left" img="{arrowLeft}" />
<mx:Object label="right" img="{arrowRight}" />
<mx:Object label="top" img="{arrowUp}" />
<mx:Object label="bottom" img="{arrowDown}" />
</mx:Array> <mx:ButtonBar id="buttonBar" dataProvider="{arr}" iconField="img" buttonHeight="64" width="500" creationComplete="init();" />
</mx:Application>
[Flex] ButtonBar系列——flex3 ButtonBar属性labelPlacement标签相对于指定图标的方向的更多相关文章
- [Flex] ButtonBar系列——flex3 ButtonBar各项之间的间距调整
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——flex3 ButtonBar样式之颜色的填充
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——flex3 ButtonBar圆角菜单的运用
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——flex3 labelFunction用户提供的函数,在每个项目上运行以确定其标签
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——flex3 皮肤和外观设置
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——控制ButtonBar菜单是否可用
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- 第一篇-Html标签中head标签,body标签中input系列,textarea和select标签
第十四周课程(1-12章节) HTML 裸体 CSS 穿华丽衣服 Javascript 动起来 一 HTML (20个标签) 1.我们的浏览器是socket客户端 2.一套规则,浏览器认识的规则 ...
- ECMall2.x模板制作入门系列之2(模板标签/语法)
ECMall2.x模板制作入门系列之2(模板标签/语法) 今天给大家带来一个模板语法的教程.希望能为ECMall模板制作者提供一份参考资料.如有问题.建议和意见,欢迎提出. 在ECMall模板中,用& ...
- struts2官方 中文教程 系列十二:控制标签
介绍 struts2有一些控制语句的标签,本教程中我们将讨论如何使用 if 和iterator 标签.更多的控制标签可以参见 tags reference. 到此我们新建一个struts2 web 项 ...
随机推荐
- WITH SCHEMABINDING
SCHEMABINDING 选项,防止视图所引用的表在视图未被调整的情况下发生改变的选项. 也就是说,一旦视图被指定了WITH SCHEMABINDING 选项,那么,在修改用于 ...
- android 如何让文本中某个关键字高亮显示?
TextView tv = (TextView) findViewById(R.id.hello);SpannableString s = new SpannableString(getResourc ...
- MySQL中Group By,distinct使用注意事项
mysql> select * from test; +----+-------+------+-------+ | id | name | age | class | +----+------ ...
- java序列化---转
Java 序列化Serializable详解(附详细例子) 1.什么是序列化和反序列化Serialization(序列化)是一种将对象以一连串的字节描述的过程:反序列化deserialization是 ...
- C# 常见集合之前的转换
1,从System.String[]转到List<System.String> System.String[] str={"str","string" ...
- Quartz CronTrigger最完整配置说明
转:http://www.blogjava.net/xmatthew/archive/2009/02/15/253864.html Quartz CronTrigger最完整配置说明 CronTr ...
- MS CRM 2011的自定义和开发(11)——插件(plugin)开发(一)
http://www.cnblogs.com/StoneGarden/archive/2012/02/02/2336147.html MS CRM 2011的自定义和开发(11)——插件(plugin ...
- bzoj1173: [Balkan2007]Point
Description 给出N个三维空间上的点. 问有多少条直线,这些直线上至少有三个点. Input 第一行给出数字N,N在[4,1000] 下面N行,每行三个数字,用于描述点的坐标,其值在[-10 ...
- erlang实现ssh
借鉴自http://blog.csdn.net/the__one/article/details/6567443和http://blog.yufeng.info/archives/1509 单命令启动 ...
- C语言每日一题之No.1
鉴于在学校弱弱的接触过C,基本上很少编程,C语言基础太薄弱.刚好目前从事的是软件编程,难度可想而知.严重影响工作效率,已无法再拖下去了.为此,痛下决心恶补C语言.此前只停留在看书,光看好像也记不住,C ...