Repeater 顾名思义,Repeat就是重复的意思, Repeater 就是用来重复的控件
Repeater 会根据数据源中对象的多少来产生多少个子项,生成的子项全部是以数组形式存在的
实现图片切换
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]
private var _arrayCollection:ArrayCollection = new ArrayCollection(["../img/images3.jpg","../img/460.jpg","../img/imagesCAV1ZQPW.jpg","../img/images52.jpg"]);
private function clickImage(e:Event):void{
showImage.source = e.currentTarget.getRepeaterItem();
}
]]>
</mx:Script>
<mx:VBox x="198" y="200">
<mx:VBox borderStyle="solid" borderThickness="1" paddingTop="2" paddingRight="2" paddingBottom="2" paddingLeft="2">
<mx:Image id="showImage" width="343" height="196" x="211" y="173" maintainAspectRatio="false"/>
</mx:VBox>
<mx:HBox borderSides="1" width="375" height="122" borderColor="0xFF0000" >
<mx:Repeater dataProvider="{_arrayCollection}" id="repArray">
<mx:VBox buttonMode="true" borderThickness="1" borderStyle="solid" paddingTop="2" paddingRight="2" paddingBottom="2" paddingLeft="2">
<mx:Image source="{repArray.currentItem}" width="100" height="100" maintainAspectRatio="false" click="clickImage(event)"/>
</mx:VBox>
</mx:Repeater>
</mx:HBox>
</mx:VBox>
</mx:Application>
buttonMode="true"==> 显示手型鼠标
maintainAspectRatio="false"==> 填充
分享到:
相关推荐
详细描述了flex Repeater的使用,方便程序开发人员在前台界面重复级任.
ASP.net 使用repeater嵌套循环
repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater嵌套repeater...
Repeater表头自定义排序; Repeater嵌套Repeater。
Repeater 分页 Repeater 分页 Repeater 分页
<asp:Repeater ID="rptUser" runat="server" onitemcommand="rptUser_ItemCommand"> <tr><td colspan="3" align="center">用户信息</td></tr> 用户编号 用户姓名 用户密码 操作 (this)"/> ...
repeater的编辑和删除,以及repeater的嵌套使用
自定义控件之万能Repeater源码 为什么要用Repeater,因为Repeater的性能最好,扩展性最强。 为什么现在用Repeater的人越来越少,因为其可操作性相对较差。 那么,如果我只需拖动一个Repeater 然后给他一个数据源 就...
关于repeater嵌套的方法,使用!! 希望对大家有帮助!!!!
repeater控件使用实例
资源包含:数据库设计、完整实例代码! 主、从表显示 有问题请与QQ:24394180联系
html repeater操作 <asp:Repeater id="repeater" onitemcommand="repeater_itemcommand"> <table>
Repeater实现RadioButton单选功能
Repeater数据显示及分页 Repeater数据显示及分页 Repeater数据显示及分页
This is my Linux port of Ultravnc repeater source code. Compile with command: Make You should now have a repeater file, start it with command ./repeater [inifilepathandname] Various settings can be ...
Repeater嵌套方法,.net在页面里Repeater控件内嵌套Repeater控件
服务器控件Repeater的使用 Repeater
c# repeater 锁表头 一、将表头与内容分离。 此方法的思路其实很简单,就是将表头放在一个表格中,将表单内容repeater放在一个DIV中 ,再将DIV的样式高度设为定值,并将此div设置为允许出现纵向滚动条。这种方法...
vnc远程桌面中转方案。一台物理机作为VNC Repeater,一个虚拟机作为VNC客户端,一个虚拟机作为VNC服务端。自行编写,实测通过。
repeater控件显示日期