Remove item from Tile : Tile « Container « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Container » TileScreenshots 
Remove item from Tile
Remove item from Tile
         
<?xml version="1.0"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>
        
            import mx.effects.DefaultListEffect;
            import mx.collections.ArrayCollection;
            
            [Bindable]
            private var dataCollection:ArrayCollection = new ArrayCollection();
            
            private function removeFromList():void {
                var index : int = dataCollection.getItemIndextileList.selectedItem );
                dataCollection.removeItemAtindex );
            }

            private function addToList():void {
                dataCollection.addItemAtMath.random()0);
            }            
      
    </mx:Script>

    <mx:DefaultTileListEffect id="effect" moveDuration="250" fadeInDuration="250" fadeOutDuration="250" />

    <mx:TileList id="tileList" width="500" height="200" dataProvider="{ dataCollection }" itemsChangeEffect="{ effect }" />

    <mx:HBox>
        <mx:Button label="Add New Item" click="addToList();" />
        <mx:Button label="Remove Selected Item" click="removeFromList();" />
    </mx:HBox>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Create horizontal Tile containerCreate horizontal Tile container
2.Use Tile control's tileWidth to specify the width of the tilesUse Tile control's tileWidth to specify the width of the tiles
3.Retrieve last child index in a Tile, child indices are zero-basedRetrieve last child index in a Tile, child indices are zero-based
4.Get reference to last child in a TileGet reference to last child in a Tile
5.Tile DemoTile Demo
6.A Tile Container with draggable childrenA Tile Container with draggable children
7.Override layout to use TileLayoutOverride layout to use TileLayout
8.Create the horizontal Tile containerCreate the horizontal Tile container
9.Using Tile control's tileWidth property to specify the width of the tilesUsing Tile control's tileWidth property to specify the width of the tiles
w___w__w___._j__a___v___a_2__s.__c_o_m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.