A List ItemRenderer customization ?

Hi
I'm using a custom item renderer in two places of the application in LIST control, both accept same data and displays same info.
Now i want to set some visual properties in one of the List Control, without chaning the code of the ItemRenderer. How can i do that?
Is there any ItemFunction or ItemRendererFunction for list control? so i could display one of the List's item in Black and second in White [default]
Thanks.

<mx:List>
<mx:itemRenderer>
     <item:item color="white"/><!-- item is the namespace and item is the class in the namespace -->
</mx:itemRenderer>
</mx:List>
You can do something like above rite?? where color is the property in the item renderer.

Similar Messages

  • Extending a component which already extends a spark list ItemRenderer

    Hello everyone,
    I have the following situation: Im displaying lists of very similar data objects (they extend the same parent) so in order to avoid a lot of changes to many itemrenderers (if i need to change something in the common properties) when displaying this data, i defined a spark list ItemRenderer (in MXML) which displays the common properties (file called BaseRenderer.mxml):
    <s:ItemRenderer>
         //in the script section i override the set data property
         //some MXML labels, checkboxes, etc
    </s:ItemRenderer>
    Then i created a specific itemrenderer which extended it (file SpecificRenderer.mxml):
    <model:BaseRenderer>
         //again i override the set data property
         //some ADITIONAL MXML labels, checkboxes, etc
    </model:BaseRenderer>
    When i run the app, and when the specific renderer is used, it works (no errors are thrown) , but it only shows the content of specific renderer, nothing from base renderer is visible. Is this the right way to do this, or do i have to override some additional stuff in my specific renderers?
    Thank you.
    One more thing, i just noticed, if i remove all MXML tags from specific renderer, the content from base renderer becomes visible, seems as if specific content overrides base content. Is there a way to add mxml tags into the specificrenderer?

    Yes i suspected them to be merged, and you gave me a great idea. As you say this behavior is true across all mxml defined components, not just itemrenderers. I want to avoid actionscript renderers because i dont (and wont) have any performance issues anyway and i like flexibility in design view, so instead i found another solution which i slightly modified. Some spark components inherit property mxmlContent, which you can override. This is what i came up with in the end: I added the property override into specific renderer and everything is shown as expected (because base elements are merged with the ones from extended component).
    override public function set mxmlContent(value:Array):void {
                                            var adding:Boolean = true;
                                            var index:int = 0;
                                            while (adding) {
        var element:IVisualElement = null;
        try {          element = super.getElementAt(index); } catch(e:Error) {          }
        if ( element != null )  {
           value.push(element);
           index += 1;
        else
          adding = false;
                                            value.reverse();
                                            super.mxmlContent = value;

  • How to view List of Customization request in hierarchy.

    Hello Experts
    Once customization is saved by an user, how to visualize all the lists of customization request saved in hierarchy wise, also provide more clarity on how to transport (Process of migration) these customization requests from one server to other.
    Can someone help me with this?

    Hi!
    In SE10 transaction you can see the transports, and the customizing entries within it.
    Customizing entries are only tables and table entries, there is no hierarchical relationship between them.
    You might know, that "this entrie is a must to create that entry", but SAP doesn't know this, it knows only tables and table entries.
    The "hierarchy" is checked in those SAP standard transactions, where the customizing entries are used.
    So if you wanted to write such thing, you have to write them for each customizing entries. That would be a huge work...
    I think it's better for you to use the SE10 transaction.
    Regards
    Tamá

  • Where is the "zoom in/zoom out" Toolbar option ? It is not listed in Customize

    Where is the "zoom in/zoom out" Toolbar option ? It is not listed in Customize features.

    Normally you will see three buttons along the top of the menu panel (the panel that opens when you click the "3-bar" button). They would look something like:
    - | 100% | +
    These are a unit, so you can right-click any part of that and Move to Toolbar. Or to drag and drop it to a specific place on the toolbar, you can first use Customize. This article has details on that: [[Customize Firefox controls, buttons and toolbars]].
    Success?
    Note: the center button shows the current zoom level, but when you click it, it resets. There isn't a built-in way to type the percentage you want.

  • Check class name of List ItemRenderer

    Hello,
    I am setting the itemRenderer of a Spark Mobile List like so:
    var ir:ClassFactory=new ClassFactory(MyItemRenderer);
    ir.properties={etc. etc.};
    list.itemRenderer=ir;
    How can I check if the list's itemRenderer is MyItemRenderer or at least a class name string comparison?
    Thank you.

    Custom itemRenderer:
    public class MyItemRenderer extends LabelItemRenderer {...}
    View:
    var ir:ClassFactory=new ClassFactory(MyItemRenderer);
    ir.properties={etc. etc.};
    list.itemRenderer=ir;
    trace(ClassFactory(list.itemRenderer).generator);
    That outputs: [Class LabelItemRenderer].

  • Return data from spark list itemrenderer

    Does anybody no how to return data from the itemrender for a spark list. say i had a checkbx in my itemrenderer how can I get that info back to my main component if its selected or not. I looked at datagrid and itemeditor but I really rather use a spark list. Thanks

    thanks I also found another way to doing it. A click handler on my list when that fires I can check if checkbx has been selected by doing event.target.document.mycheckBx.selected this will not work if using currentTarget cause it take the info from the itemRenderer. Now I understand the difference between currentTarget and target.
    not sure if this is a better way to access the data I think I might still just dispatch a event and do it your way.
    Its weird that mx:list has a editItemRenderer  and s:list does not
    thanks again TK

  • Spark List Itemrenderer items outside of List

    I have a spark list and i want some of the items in it to appear out side of the list depending on the users interaction.
    Is there a way to make items of an item renderer appear outsid of the LIst container?
    When i use basic layout on the lsit and explicitly set the x and y, they appear behind the list.
    Thanks.

    Hi jmandawg,
    My ListRenderer.mxml may be what you want as follows,
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer 
    xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
    library://ns.adobe.com/flex/spark" xmlns:mx="
    library://ns.adobe.com/flex/mx" hide="mOut(
    null)" mouseMove="mOut(event)" mouseOut="mOutValueItem(event)"mouseDownOutside="mOut(event)" creationComplete="inited()"
    autoDrawBackground="
    true">
    <fx:Script>
    <![CDATA[
    import mx.controls.TextInput; 
    import mx.managers.PopUpManager; 
    import mx.utils.StringUtil; 
    import flash.text.TextLineMetrics; 
    public var mouseOnPopup:Boolean = false;  
    public var vi:mx.controls.TextInput; 
    private function inited():void {vi =
    new mx.controls.TextInput();vi.editable=
    false;vi.addEventListener(MouseEvent.MOUSE_OUT, mOut);
    vi.addEventListener(MouseEvent.ROLL_OUT, mOut);
    vi.addEventListener(MouseEvent.MOUSE_OVER, mOverPopup);
    private function mOut(event:MouseEvent):void { 
    if ( vi.isPopUp ) {PopUpManager.removePopUp(vi)
    mouseOnPopup =
    false;}
    private function mOverPopup(event:MouseEvent):void {mouseOnPopup =
    true;}
    private function mOutValueItem(event:MouseEvent):void { 
    if ( vi.isPopUp && !mouseOnPopup) {PopUpManager.removePopUp(vi)
    private function mOver(event:MouseEvent):void { 
    var txt:String = itemValue.texttxt = StringUtil.trim(txt);
    if(txt.length<5) return; 
    if(!vi.isPopUp) {PopUpManager.addPopUp(vi,
    this.parent)vi.text=txt;
    vi.setStyle(
    'fontSize',18); 
    var txtMetrics:TextLineMetrics = vi.measureText(vi.text);vi.width=txtMetrics.width*1.2
    vi.height=itemValue.height*1.4
    var p:Point = itemValue.localToGlobal(new Point(itemValue.x, itemValue.y));vi.x=p.x;
    vi.y=p.y-10;
    ]]>
    </fx:Script>
    <s:TextInput id="itemValue" text="{data.value}" width="200" mouseOver="mOver(event)" mouseOut="mOutValueItem(event)" mouseMove="mOut(event)" editable="false"/> 
    </s:ItemRenderer>
    You may test it with the following in your main.mxml
    Bindable] 
    private var detailAC:ArrayCollection = new ArrayCollection([{value:"nteDevice.device"},{value:
    "nteDevice.deviceTypenteDevice.loopbackIpAddr"},{value:
    "nteDevice.ipAddressnteDevice.loopbackIpAddr"},{value:
    "nteDevice.loopbackIpAddrnteDevice.loopbackIpAddr"}, {value:
    "nteDevice.release"},{value:
    "nteDevice.releasenteDevice.loopbackIpAddr"},{value:
    "nteDevice.clli"},{value:
    "nteDevice.provisionStatus"}]);
     <s:List id="lst" itemRenderer="com.att.ntscp.view.component.ListRenderer" dataProvider="{detailAC}" width="200" height="200"/>
    Is it a little bit trick?
    Jeffrey

  • Suggested workaround for list itemrenderer bug?

    Can someone point me in the right direction for a workaround for the problem described as Flex bug 28191:
    https://bugs.adobe.com/jira/browse/SDK-28191
    Steps to reproduce:
    1. Populate a Tree/List with data and provide a custom itemRenderer class factory.
    2. Change the class factory and dataProvider at the same time.
    3. List.createItemRenderer() will crash during since Factory is the key and it has been changed.
                    delete freeItemRenderersByFactory[factory][renderer];
    Actual Results:
    Crash because the renderer can not be found since it does not exist on that factory dictionary since the class factory was changed and the lookup is using the new factory.
    Expected Results:
    Not crash.
    Seems like a race condition, as sometimes during this process it skips that block of code but in other cases it falls into this block and fails.
    I need to change the data provider and item renderer of a tree control at runtime. Is there one or more methods I should run to prevent this? As the bug notes state, this is an intermittent problem. The error occurs here:
    if (factory == itemRenderer)
                if (freeItemRenderers && freeItemRenderers.length)
                    renderer = freeItemRenderers.pop();
                    delete freeItemRenderersByFactory[factory][renderer];

    Thanks. Actually, I have been updating (not setting or changing) the tree's dataprovider, and then changing the classFactory like this:
    processesXML = event.result as XML;
    nodeTreeData.source = processesXML.children();
    if (treeMultiSelect)
    nodeTree.itemRenderer=new ClassFactory(renderers.TreeItemRendererV1);
    nodeTree.allowMultipleSelection = true;
    nodeTree.setStyle("selectionColor", "0xFFFFFF");
    nodeTree.setStyle("disclosureOpenIcon", MinusIcon);
    nodeTree.setStyle("disclosureClosedIcon", PlusIcon);
    else
    nodeTree.itemRenderer=new ClassFactory(mx.controls.treeClasses.TreeItemRenderer);
    nodeTree.allowMultipleSelection = false;
    nodeTree.setStyle("selectionColor", "0x7FCEFF");
    nodeTree.setStyle("disclosureOpenIcon", OpenArrowIcon);
    nodeTree.setStyle("disclosureClosedIcon", ClosedArrowIcon);
    I had tried using validateNow after changing the ClassFactory before but did get the error again. I will try it again but update the data provider after. Since it's an intermittent error I'm finding it hard to know if a fix is really working.

  • Utility to list all customizations in the system

    Hi,
    Please let me know if there is any utility (Program/FM) to list all the customizations like Z programs, Z tables, Z FMs...
    We are planning to do a system upgrade and our old system has many customizations done in it. For feasibility analysis we need this information.
    Please share your thoughts.
    Thanks,
    Prathap

    Hi prathap,
    the rather technical way is to check all release transports in development system. Table E070 has the transport headers, E071 the gtransöported objects.
    Regards,
    Clemens

  • Dynamic height of mx:Text in List ItemRenderer

    Hello,
    I want to have a list with line breaks if the width of the
    items is higher then the width of the list.
    I wrote my custon ItemRender but if i set the no height to
    the mx:Text there would be only first line tdisplayed on the list
    My List looks like this
    <mx:List id="level1" dataProvider="{level1List}"
    width="100%" height="100%"
    change="selectLevel1ItemEvent(event)">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox height="100%">
    <mx:Text width="100%" height="40" text="{data.desc}"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:List>
    The problem is that know all items have a height to fit an
    item with two lines. I want only have this if the width of an item
    is higher than the width of the list.
    Thanks,
    Stefan

    try setting minHeight of the RTE to 0

  • Flex List ItemRenderer : Change States from parent ?

    Hai there,
    So i created a list that uses an arrayCollection as dataProvider and an itemRenderer with 2 states : LabelState and ProgressState, the labelState is the start state and shows a Filename, the progressState is the state i need to change to when i press a "Start Upload" Button.
    This is the itemrenderer :
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    autoDrawBackground="true" currentState="LabelState" width="800">
    <s:states>
    <s:State name="LabelState" />
    <s:State name="ProgressState" />
    </s:states>
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    public function changeState():void
    trace("changing state for " + label_field.text);
    this.currentState = "ProgressState";
    trace(this.currentState);
    ]]>
    </fx:Script>
    <s:Label name="label_field" paddingLeft="10" maxHeight="40" paddingTop="10" paddingBottom="10" id="label_field" width="800" color="#333333" includeIn="LabelState" text="{data.label}"/>
    <mx:ProgressBar id="progress_field" left="3" top="3" bottom="3" mode="manual" chromeColor="#0096FF" includeIn="ProgressState" textAlign="center" labelPlacement="center" maximum="100" color="#FFFFFF" right="3"/>
    </s:ItemRenderer>
    This is the code for the List :
    <s:List keyUp="lst_selected_files_keyUpHandler(event)" skinClass="styles.skins.ListSkinNoHorizontal"
    borderVisible="false"
    contentBackgroundColor="#c9c9c9" contentBackgroundAlpha="1"
    id="lst_selected_files"
    width="100%" height="100%"
    alternatingItemColors="[#EAEAEA,#FAFAFA]" color="#000000"
    itemRenderer="components.ProgressLabel" dataProvider="{arr_items}" />
    <components:RemoveBar nr_of_items="{arr_items.length}" id="cmp_removeBar" hermesRYA="cmp_removeBar_hermesRYAHandler(event)" bottom="-35" width="100%" height="35" />
    This is the function that changes the states for the current "to be uploaded file":
    protected function uploadNextFile():void
    if(uploadingFile!=null) uploadingFile==null;
    popup = null;
    popup = new ProgressPanel();
    lst_selected_files.selectedIndex = currentUploadNr;
    current_progressItem = lst_selected_files.dataGroup.getElementAt(currentUploadNr) as ProgressLabel;
    current_progressItem.changeState();
    lst_selected_files.validateNow();
    For some reason the states change ... but the elements aren't visually updated, ... meaning that i still see the label and the progressbar isn't visible :/
    anyone ?

    This seems to work for me:
    <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" >
        <s:controlBarContent>
            <s:Button label="test" click="(list1.dataGroup.getElementAt(0) as Object).test()" />
        </s:controlBarContent>
        <s:List id="list1">
            <s:dataProvider>
                <s:ArrayList>
                    <fx:Array>
                        [0,1,2]
                    </fx:Array>
                </s:ArrayList>
            </s:dataProvider>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <fx:Script>
                            <![CDATA[
                                public function test():void {
                                    currentState = 'state2';
                            ]]>
                        </fx:Script>
                        <s:states>
                            <s:State name="state1" />
                            <s:State name="state2" />
                        </s:states>
                        <s:Rect width="50" height="50">
                           <s:fill>
                               <s:SolidColor color.state1="red" color.state2="green" />
                           </s:fill>
                        </s:Rect>
                        <mx:ProgressBar includeIn="state2" />
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:List>
    </s:Application>
    You will probably want to override getCurrentRendererState() to do this properly tho.  This post demonstrates how to use DataRenderer instead if you would rather: http://flexponential.com/2010/02/07/using-datarenderer-to-add-custom-states-to-a-spark-lis t-renderer/
    In general you shouldn't interact with the renderers of a List directly (via getElementAt), but rather by changing the data in the List and building an ItemRenderer that reacts to those changes.  So it would be better if you did something like list1.dataProvider.getItemAt(0).changeState = true and then in your renderer override the data setter to change the state if that variable is set.

  • List/ItemRenderer troubles

    Hey,
    I just submitted a bug here: http://bugs.adobe.com/jira/browse/SDK-24069 and thought I would see if the community had a workaround. Like always, I could just be missing something really basic. Thanks,
    - e
    Oh, the code (and playable swf) is posted at jira, but I'll reproduce it here (must use latest SDK build...).
    <?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/halo">
      <fx:Script>
        <![CDATA[
          [Bindable] public var itemRenderersHeight:int = 60;
        ]]>
      </fx:Script>
      <s:HGroup gap="20" y="100" x="100">
        <s:List id="myList" borderVisible="false">
          <!--<s:layout><s:VerticalLayout /></s:layout>-->
          <s:ArrayCollection>
            <fx:Object label="hello"  color="0xff0000" />
            <fx:Object label="cruel"  color="0x00ff00" />
            <fx:Object label="world!" color="0x0000ff" />
          </s:ArrayCollection>
          <s:itemRenderer >
            <fx:Component>
              <s:ItemRenderer width="100%" height="{myItemRenderersHeight}"
                      mouseOver="{myBorder.setStyle('backgroundAlpha',.8)}"
                      mouseOut="{myBorder.setStyle('backgroundAlpha', .5)}"
                      creationComplete="init()">
                <fx:Script>
                  <![CDATA[
                    import mx.binding.utils.BindingUtils;
                    import mx.binding.utils.ChangeWatcher;
                    [Bindable] public var myItemRenderersHeight:int = 60;
                    protected function init():void {
                      myItemRenderersHeight = this.parentApplication.itemRenderersHeight;
                      var watcherSetter:ChangeWatcher =
                        BindingUtils.bindSetter(updateHeight, this.parentApplication, "itemRenderersHeight");
                    public function updateHeight(val:int):void {
                      this.height = val;
                  ]]>
                </fx:Script>
                <s:Border id="myBorder" width="100%" height="100%"
                      borderColor="green" borderWeight="2"
                      backgroundColor="{data.color}" backgroundAlpha=".5">
                  <s:Label id="myLabel" text="{data.label}" verticalCenter="0" horizontalCenter="0" />
                </s:Border>
              </s:ItemRenderer>
            </fx:Component>
          </s:itemRenderer>
        </s:List>
        <s:Label height="{itemRenderersHeight}" width="100"
             text="height: {itemRenderersHeight}px" backgroundAlpha=".6" backgroundColor="black" color="white"
             verticalAlign="middle" textAlign="center"/>
        <s:NumericStepper stepSize="5" minimum="10" maximum="130" value="@{itemRenderersHeight}"/>
      </s:HGroup>
    </s:Application>

    grrrrr, super simple solution -- remove height/width properties of <s:ItemRenderer> and paste them into the <s:Border> class (the uicomponent wrapped by the itemrenderer). Also for a cleaner look, uncomment the list's layout property and set gap to -1.
    my understanding is that <s:itemRenderer> (pay attention to case) is a factory class, which churns out the contents of <s:ItemRenderer> (a subclass of the Group UIComponent), so I'm confused why I can't set the dimensions directly on <s:ItemRenderer>.
    Anyway, here is the fixed code:
    <?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/halo">
      <fx:Script>
        <![CDATA[
          [Bindable] public var itemRenderersHeight:int = 60;
        ]]>
      </fx:Script>
      <s:HGroup gap="20" y="100" x="100">
        <s:List id="myList" borderVisible="false">
          <s:layout><s:VerticalLayout gap="-1"/></s:layout>
          <s:ArrayCollection>
            <fx:Object label="hello"  color="0xff0000" />
            <fx:Object label="cruel"  color="0x00ff00" />
            <fx:Object label="world!" color="0x0000ff" />
          </s:ArrayCollection>
          <s:itemRenderer >
            <fx:Component>
              <s:ItemRenderer initialize="init()">
                <fx:Script>
                  <![CDATA[
                    import mx.binding.utils.BindingUtils;
                    import mx.binding.utils.ChangeWatcher;
                    protected function init():void {
                      var watcherSetter:ChangeWatcher =
                        BindingUtils.bindSetter(updateHeight, this.parentApplication, "itemRenderersHeight");
                    public function updateHeight(val:int):void {
                      myBorder.height = val;
                  ]]>
                </fx:Script>
                <s:states>
                  <s:State name="normal" />
                  <s:State name="hovered" />
                </s:states>
                <s:Border id="myBorder" width="200"
                      borderColor="green" borderWeight="2"
                      backgroundColor="{data.color}"
                      backgroundAlpha=".5" backgroundAlpha.hovered=".9">
                  <s:Label id="myLabel" text="{data.label}" verticalCenter="0" horizontalCenter="0" />
                </s:Border>
              </s:ItemRenderer>
            </fx:Component>
          </s:itemRenderer>
        </s:List>
        <s:Label height="{itemRenderersHeight}" width="100"
             text="height: {itemRenderersHeight}px" backgroundAlpha=".6" backgroundColor="black" color="white"
             verticalAlign="middle" textAlign="center"/>
        <s:NumericStepper stepSize="5" minimum="10" maximum="130" value="@{itemRenderersHeight}"/>
      </s:HGroup>
    </s:Application>
    - e

  • List ItemRenderer contains old values

    Hi Everyone,
         I have used List for show the data from db. Data will update periodically. My problem is some rows contains old values. I have tried validateNow(), invalidateList...
    But I cant achieve the result.
    Kindly Suggest me the possible ways to reset the Data.
    Thanks in Advance.
    Arun P. Ganesh

    If you are using custom ItemRenderer, you need to declare a variable within custom ItemRenderer and use that variable to display the data.

  • List itemRenderer text position

    Hello!
    I have a list as depicted in the attached file.
    The Image container has a max with and max height set to 100 and maintain the aspect ratio.
    The first 10 are 100x75 because they are wide and it all looks good.
    However, the last one which is square and so 100x100, overlaps the text.
    If I was to set the text y right after the image ends, it would look bad for the first 10 images as the space would be too large.
    I tried setting the text y to be imageContainer.contentHeight, but that doesn't work.
    What would you do?
    Thanks!

    hi,
    Here is a test app you can use to load images and 'play' with the renderer.
    <?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[
    import mx.controls.Image;
    import spark.events.IndexChangeEvent;
    import mx.managers.DragManager;
    import mx.events.DragEvent;
    import mx.events.EffectEvent;
    import mx.events.FlexEvent;
    import mx.collections.ArrayCollection;
    [Bindable] private var ImageCollection: ArrayCollection = new ArrayCollection();
    private var fl:FileReferenceList=new FileReferenceList();
    private var fr:FileReference = new FileReference();
    private var ImageCount: int; 
    private var ImageLoop : int;
    private function loadImages(): void
    fl.addEventListener(Event.SELECT, selectedImages);
    var imagesFilter:FileFilter = new FileFilter("Images", "*.jpg;*.gif;*.png");
    fl.browse([imagesFilter]);
    private function selectedImages(e:Event): void
    fl.removeEventListener(Event.SELECT, selectedImages);
    ImageCount = fl.fileList.length;
    ImageLoop  = 0;
    loopList(0);
    private function loopList(value:int): void
    if (value < ImageCount)
    fr = fl.fileList[value];
    fr.addEventListener(Event.COMPLETE,getImage);
    ImageLoop = ImageLoop+1;
    fr.load();
    else
    imgList.dataProvider = null;
    imgList.dataProvider = ImageCollection;
    private function getImage(e:Event): void
    fr.removeEventListener(Event.COMPLETE, getImage);
    if (fr.data.length > 0)
    var newData:Object = {
    img: fr.data,
    lbl: fr.name
    ImageCollection.addItem(newData);
    loopList(ImageLoop);
    ]]>
    </fx:Script>
    <s:List id="imgList" x="116" y="76" width="835" height="542" dataProvider="{ImageCollection}" itemRenderer="ImageRender">
    <s:layout>
    <s:TileLayout horizontalGap="3" verticalGap="3"/>
    </s:layout>
    </s:List>
    <s:Button x="116" y="35" label="Button" click="loadImages()"/>
    </s:Application>

  • Capture click on element inside List itemRenderer

    Hello!
    I have a List that opens a window when an element is selected.
    However, I also have a "delete" image in the upper-right corner of the itemRenderer componenet that when clicked should do something else.
    How can I make it so that when user clicks on the image the click doesn't select the list element, and when the user click anywhere else, it defaults to selecting the element in the list.
    Thank you!

    Yeah, I did that right after posting and the problem was that the List select event dispatched on MouseDown NOT on click and I was listening for Click on the image which never happened as the MouseDown came first and opened another window.
    Is there any easy way to setting the selection of elements in a list to be Click rather than MouseDown?
    If not, I will just listen for MouseDown on the image.

Maybe you are looking for

  • Safari won't open, I'm running 10.6.8, with safari 5.1.7

    Hi, Safari was working fine yesterday, but today I switched on my macbook pro (10.6.8) and now safari won't open. It says "Safari cannot be opened because of a problem. Check with the developer to make sure Safari works with this version of Mac OS X.

  • FM9: PDF, DITA, paragraph texts in bookmarks

    Hello FrameMakers! I have created a DITA map and some topics. When I save the DITA map as PDF with bookmarks, the bookmarks contain the text of all paragraphs. But of course I would like to have only the titles as bookmarks. A solution could be to ex

  • Slow CD-import in iTunes - why?

    I've been importing some CDs on my MacBook today (2Ghz, Core 2 Duo), and I'm quite surprised to find that it is considerably slower than on my four-year(!) old Dual G5. When the import begins (using the Apple Lossless-codec) the speed is as slow as 4

  • Report painter Tables

    Hi,    I am working on Report painter. Production order based reports (Ex: T.Code : kko4 and T.Code: kko0). I want to add some more fields in to the table. Can any body guide me how to locate the relevant table and libraries .    Aftter adding the ne

  • How to - Open a photoshop document - Interface or suit - for plugin

    Hello friends, Kindly help me... If we know the path to the document, is there any suit or interface available in photoshop cs2's sdk for opening a document in photoshop window? We are developing phtoshop automation plug-ins, to all user to encode an