[Flex] ButtonBar系列——labelFunction用户提供的函数,在每个项目上运行以确定其标签
<?xml version="1.0" encoding="utf-8"?>
<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[
private var buttonBarXML:XML = describeType(ButtonBar);
protected function labelFun(item:Object):String
{
//trace(buttonBarXML.factory.toString());
var cat:String = item.label.toUpperCase();
var len:uint = buttonBarXML.factory.child(item.data).length();
return item.label + " (" + len + ")"; }
]]>
</fx:Script> <fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<s:ArrayList id="arr">
<fx:Array>
<fx:Object label="Accessors" data="accessor"/>
<fx:Object label="Methods" data="method"/>
<fx:Object label="ImplementsInterface" data="implementsInterface"/>
<fx:Object label="Variable" data="variable"/>
</fx:Array>
</s:ArrayList>
</fx:Declarations>
<s:ButtonBar id="buttonBar" dataProvider="{arr}" labelFunction="labelFun" />
</s:Application>
[Flex] ButtonBar系列——labelFunction用户提供的函数,在每个项目上运行以确定其标签的更多相关文章
- [Flex] ButtonBar系列——flex3 labelFunction用户提供的函数,在每个项目上运行以确定其标签
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="h ...
- [Flex] Accordion系列-动态添加或删除Accordion容器中项目
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何使用addChild()和removeCh ...
- 【Android Studio安装部署系列】二十一、Android studio将项目上传到github中
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 两个相关概念:git和github Git是一个开源的分布式版本控制系统,用以有效.高速的处理从很小到非常大的项目版本管理.Git ...
- [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 ...
- [Flex] ButtonBar系列——简单布局
<?xml version="1.0" encoding="utf-8"?> <!--通过layout属性,设置ButtonBar布局--&g ...
- [Flex] ButtonBar系列——最后一个项目的样式设置
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——控制ButtonBar菜单是否可用
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- [Flex] ButtonBar系列——arrowKeysWrapFocus属性如果为 true,则使用箭头键在组件内导航时,如果击中某一端则将折回。
<?xml version="1.0" encoding="utf-8"?> <!--arrowKeysWrapFocus 如果为 true, ...
随机推荐
- winform 调用http 通过代理出现的一系列问题
如果遇到以上问题,请拷贝以下代码到你的桌面应用程序的app.config 文件中 <system.net> <defaultProxy enabled="false&quo ...
- 【转】C# winform 安装程序打包(自定义操作)
(一),安装程序 以前用vs制作过安装程序,现在把步骤写出来,有帮助的大家一定要顶哦 第一步:建立工程1.打开vs,新建项目->其他项目类型->安装和部署(這個子项下面有安装项目和Web安 ...
- HTML5之Canvas绘图——使用Canvas绘制图形的基本教程
原文转自:http://www.cnblogs.com/picaso/archive/2012/11/26/2789077.html HTML5火的正热,最近有个想法也是要用到HTML的相关功能,所以 ...
- nginx http跳转到https
server { listen 80; server_name www.888.com; location / { #index.html放在虚拟主机监听的根目录下 root /usr/local/n ...
- discuz X2.0教程]教你快速了解Discuz!程序文件功能,修改文件从此不用再求人
x3.x数据字典 http://faq.comsenz.com/library/database/x3/x3_index.htm 先从根目录开始,根目录文件一般都是入口,即执行具体功能的代码一般不在这 ...
- ie数组不支持indexOf 方法解决
if(!Array.prototype.indexOf){ Array.prototype.indexOf = function(obj){ for(var i=0;i<this.length; ...
- jQuery validate基本原则
Markup recommendations Each input has a label associated with it: The for-attribute of the label ref ...
- 并行计算之OpenMP中的任务调度
本文参考<OpenMP中的任务调度>博文,主要讲的是OpenMP中的schedule子句用法. 一.应用需求 在OpenMP并行计算中,任务调度主要用于并行的for循环.当for循环中每次 ...
- 【linux】bash常用快捷键
Ctrl + r:逆向搜索命令历史 Ctrl + l:清屏 Ctrl + c:终止命令 Ctrl + u:删除光标前的指令 Ctrl + k:删除光标后的指令 Ctrl + d:退出登陆
- input 字符限制
1,文本框只能输入数字代码(小数点也不能输入): onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste=&q ...