Specifying an icon to the List control : List Renderer « Components « Flex






Specifying an icon to the List control

Specifying an icon to the List control
     

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        [Embed(source="logo.jpg")]
        public var iconSymbol1:Class;
        [Embed(source="logo.jpg")]
        public var iconSymbol2:Class;
      
    </mx:Script>
    <mx:List iconField="myIcon">
        <mx:dataProvider>
            <mx:Array>
                <mx:Object label="A" data="AA" myIcon="iconSymbol1" />
                <mx:Object label="B" data="BB" myIcon="iconSymbol2" />
                <mx:Object label="C" data="CC" myIcon="iconSymbol1" />
            </mx:Array>
        </mx:dataProvider>
    </mx:List>
</mx:Application>

   
    
    
    
    
  








Related examples in the same category

1.DropIn RendererDropIn Renderer
2.Inline RendererInline Renderer
3.Inline Renderer with Complex ObjectsInline Renderer with Complex Objects
4.List control uses default item renderer to display stringsList control uses default item renderer to display strings
5.Renderer and Editor for ListRenderer and Editor for List
6.List control uses the default item renderer to display each of the three strings that represent postal codes for Alaska, Alabama, and Arkansas.List control uses the default item renderer to display each of the three strings that represent postal codes for Alaska, Alabama, and Arkansas.
7.Using Image renderer for ListUsing Image renderer for List
8.Editable ListEditable List
9.Create an Editable ListCreate an Editable List