Repeater使用简介
? ? ?mx组件中的Repeater类似与sprak中的DataGroup,可以根据数据源循环一些组件,例如:一组RadionButton。
?
? ? ?网上的很多例子都是用mxml写的,本文将主要介绍用as来编写Repeater。
?
? ? ?1 先定义好Repeater所在的容器,例如下面代码
? ? ? ??<mx:Tile direction="horizontal" borderStyle="none" id="tile"
?
2 ?编写Repeater的childDescriptors?
?
? ??var descriptorProps:Object = {};
var obj:Object = {};obj.label = rp.currentItem.name;obj.group = group;obj.maxWidth=120;return obj;}??
?
?
?
?