Flex4 spark list which shows the number

Displaying the row number or index in a spark List
Flex4 spark list which shows the number

<?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" width="200" height="215"  viewSourceURL="srcview/index.html">

    <s:List height="200" width="200" top="10">
            <s:VerticalLayout gap="1" horizontalAlign="justify" />
                <fx:String>Roberto Luongo</fx:String>
                <fx:String>Scott Niedermayer</fx:String>
                <fx:String>Jarome Iginla</fx:String>
                <fx:String>Dan Boyle</fx:String>
                <fx:String>Rick Nash</fx:String>
                <fx:String>Ryan Getzlaf</fx:String>
                <fx:String>Martin Brodeur</fx:String>
                <fx:String>Chris Pronger</fx:String>
                <fx:String>Shane Doan</fx:String>
                <fx:String>Shea Weber</fx:String>
                <fx:String>Patrick Marleau</fx:String>
                <fx:String>Jay Bouwmeester</fx:String>
                <fx:String>Duncan Keith</fx:String>
                <fx:String>Dany Heatley</fx:String>
                <fx:String>Robyn Regehr</fx:String>
                <fx:String>Mike Richards</fx:String>
                <fx:String>Brenden Morrow</fx:String>
                <fx:String>Martin St. Louis</fx:String>
                <fx:String>Jeff Carter</fx:String>
                <fx:String>Eric Staal</fx:String>
                <fx:String>Sidney Crosby</fx:String>
                            import spark.components.List;
                            override public function set data(value:Object):void {
                                super.data = value;

                                if (value == null)

                                txtPlayer.text = String(data);
                                txtRowNumber.text = String(itemIndex);

                                // NOTE: In older builds ItemRenderer.itemIndex didn't exist yet.  If you are on an older
                                // build you can get this information using the following line instead:
                                //txtRowNumber.text = String((owner as List).dataProvider.getItemIndex(data));
                        <s:Rect width="25" height="20">
                                <s:SolidColor color="0xFF0000" />
                        <s:Label color="white" fontWeight="bold" horizontalCenter="0" verticalCenter="0" />

                    <s:Label x="30" verticalCenter="0" />


分类:Flash 时间:2010-02-21 人气:263
blog comments powered by Disqus


  • hibernate3.2 Create Database Table 2010-03-26

    Although hibernate3.2 version is old, but in order to adapt to certain situations, under the application and understanding of hibernate, to learn about 3.2 version! 1: Add the hibernate's jar file: hibernate root directory the following: hibernate3.j

  • FLEX embedded in the html code 2010-04-12

    <? Xml version = "1.0" encoding = "utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Image alpha="100" source="file:///C|/Documents and Settings/

  • Text Processing Study Notes 3 2010-06-17

    Environment as follows: python-2.5.2 python stand-alone program is frequently used for the analytical parameters, The following use locals () dictionary as a variable input parameters into the paramTest.py # coding:gbk import os import sys import tim

  • MyEclipse plug-in Keys 2010-07-27

    Eclipse is an open source, extensible IDE, has attracted a lot of industry attention, and the Eclipse supporters endless. It is one of the important benefits of scalability, well, you can expand the number of plug-ins, open source plug-ins and plug-i

  • jodconverter plain text files to pdf problem when the Chinese solution 2010-09-25

    jodconverter convert ms files are not found in the Chinese problem, but the conversion simple text file Shique Chinese problems arise. I started looking for a cpdetecter to detect text file encoding format, but the encoding format of some documents o

  • One study notes Flex (Flex Profile) 2010-11-29

    In order to improve the user experience, the emergence of a new type of Internet applications. That is Rich Internet Application. These applications combine fast response of desktop applications, the advantages of strong interactive Web applications

  • 这几年用过的技术 2012-11-02

    Core Java, J2EE, JSP, JDBC, Servlets, AJAX, XML, HTML, XSLT, Web Services, CSS, JavaScript, SQL, Oracle 10g, MySQL 5.0., JMS,Eclipse, Adobe Flex Builder 4.x,UML, JDBC, SVN, JUnit, VSS, Jira, HTML, DHTML, CSS, AJAX, JavaScript, XML, MXML, Action Scrip

  • Java 程序员的堕落 2012-11-06

    我曾在多个场合撰文说过,现在培训出来的企业Java开发兵团只知道使用某种框架,但完全不知道这些框架的底层原理.今天早上,在依次对三个职位的应聘者面试中,我又再次见到了这种情形. 我们的顾问公司收到了一个客户的招聘需求,要一个经验丰富并通晓SQL的Java开发人员.我们公司在这个客户那里享有非常好的声誉,于是我们从招聘代理公司要来了一批简历,开始搜寻合适的目标. 首先,关于他们的简历--每份简历都有数页,详细的描述了在各个公司干过的各种工作.每份简历上都有一个技术列表,表面上看这些都是应聘者懂得的

  • [Order] sql statement some practical tips for oracle 2010-03-30

    Finishing a book read long ago, and forgot what this was, now contributed. 1) In the select statement, use conditional logic 1select ename, sal, 2 case when sal <= 2000 then 'UNDERPAID' 3 when sal> = 4000 then 'OVERPAID' 4 else 'OK' 5 end as status

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.051 (s). 13 q(s)