Set data for a TileList control : TileList « Container « Flex






Set data for a TileList control

Set data for a TileList control
  
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="initData();">
    <mx:Script>
        
        import mx.controls.Button;
        import mx.collections.*;
        private var listArray:Array=[
            {label: "item0", data: 0},
            {label: "item1", data: 1},
            {label: "item2", data: 2},
            {label: "item3", data: 3},
            {label: "item4", data: 4},
            {label: "item5", data: 5},
            {label: "item6", data: 6},
            {label: "item7", data: 7},
            {label: "item8", data: 8}];
            
        [Bindable]
        public var TileListdp:ArrayCollection;
        
        private function initData():void {
            TileListdp = new ArrayCollection(listArray);
        }
      
    </mx:Script>
    <mx:TileList dataProvider="{TileListdp}" itemRenderer="mx.controls.Button" />
</mx:Application>

   
    
  








Related examples in the same category

1.Using a TileListUsing a TileList
2.TileList DataProviderTileList DataProvider
3.Tile List Custom Effect and Default EffectTile List Custom Effect and Default Effect