[Flex] ButtonBar系列——flex3 labelFunction用户提供的函数,在每个项目上运行以确定其标签
<?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.ButtonBar; private var buttonBarXML:XML = describeType(ButtonBar); private function buttonBar_labelFunc(item:Object):String {
var cat:String = item.category.toUpperCase();
var len:uint = buttonBarXML.factory.child(item.data).length();
return cat + " (" + len + ")";
}
]]>
</mx:Script> <mx:Array id="arr">
<mx:Object category="Accessors" data="accessor" />
<mx:Object category="Methods" data="method" />
</mx:Array>
<mx:ButtonBar id="buttonBar" dataProvider="{arr}" labelFunction="buttonBar_labelFunc" />
</mx:Application>
[Flex] ButtonBar系列——flex3 labelFunction用户提供的函数,在每个项目上运行以确定其标签的更多相关文章
- [Flex] ButtonBar系列——labelFunction用户提供的函数,在每个项目上运行以确定其标签
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——flex3 皮肤和外观设置
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] ButtonBar系列——flex3 ButtonBar属性labelPlacement标签相对于指定图标的方向
<?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 ButtonBar圆角菜单的运用
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- Git学习系列之如何正确且高效地将本地项目上传到Github(图文详解)
不多说,直接上干货! 首先你需要一个Github账号,所以还没有的话先去注册吧! https://github.com/ 见 如何走上更高平台分享传递干货知识:(开通个人Github面向开源及私有软件 ...
- [Flex] ButtonBar系列——垂直布局
<?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 ...
随机推荐
- UDP/TCP通信小记
TCP 和UDP的区别 TCP是面向连接的; 所谓连接 就是 打开的时候要握手,收发数据的时候要确认(传说中的窗口协议保持滑动过去的窗口都已成功发送,接收方已经成功接收). UDP是无连接的. 所 ...
- 如何让div水平垂直居中
引子 我们经常遇到需要把div中的内容进行水平和垂直居中.所以,这里介绍一种方法,可以使div水平居中和垂直居中. 代码: <!DOCTYPE html> <html lang=&q ...
- CodeFirstMigrations更新数据库结构(EF数据迁移)
背景 code first起初当修改model后,要持久化至数据库中时,总要把原数据库给删除掉再创建(DropCreateDatabaseIfModelChanges),此时就会产生一个问题,当我们的 ...
- linux服务之git
http://www.cnblogs.com/fnng/archive/2011/08/25/2153807.html http://www.cnblogs.com/sunada2005/archiv ...
- pouchdb Conflicts
Conflicts are an unavoidable reality when dealing with distributed systems. And make no mistake: cli ...
- 更简单的跨域解决方案 - CORS
跨域问题是前端开发经常遇到的了,大家可能常用的就是JSONP了, JSONP非常方便,只要前后端约定好一个方法名,就可以沟通了,但JSONP也有一定的局限,JSONP只支持GET请求,还有当你想提供一 ...
- Why doesn't Genymotion run on Windows 10?
To date, VirtualBox is not yet fully compatible with Windows 10. As Genymotion relies on the use of ...
- mysql中添加一个和root一样的用户用于远程连接
mysql中添加一个和root一样的用户用于远程连接: 大家在拿站时应该碰到过.root用户的mysql,只可以本地连,对外拒绝连接. 下面语句添加一个新用户administrtor: CREATE ...
- js为DIV动态设置id属性
<script> var objs=document.getElementById("iproduct").getElementsByTagName("div ...
- JavaScript中的继承模式总结
一.总结: //js中的几种继承 //原型链的问题,包含引用类型的原型属性会被实例共享,子类型无法给超类型传递参数 function SuperType() { this.colors = [&quo ...