List change event : List Event « Components « 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 » Components » List EventScreenshots 
List change event
List change event
           
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:Script>
        
            import mx.controls.List;
            import mx.controls.Alert;
            
            private function handleChangeEvent(event:Event):void
            {
                Alert.show("selected: " + List(event.currentTarget).selectedItem.label);
            }
            
      
    </mx:Script>
    
    <mx:List change="handleChangeEvent(event)">
        <mx:dataProvider>
            <mx:Array>
                <mx:Object label="A" />
                <mx:Object label="B" />
                <mx:Object label="C" />
            </mx:Array>
        </mx:dataProvider>
    </mx:List>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Change event for List controlChange event for List control
2.Adding an event listener if one isn't presentAdding an event listener if one isn't present
3.Event listener in an ActionScript function in an tagEvent listener in an ActionScript function in an <mx:Script> tag
4.Get selected item from a list from change eventGet selected item from a list from change event
5.Convert event target to List controlConvert event target to List control
6.Write your event listener to access the event objectWrite your event listener to access the event object
7.A data-binding watcher invokes an event listener when a binding occurs.A data-binding watcher invokes an event listener when a binding occurs.
8.List dragOver, dragDrop, dragExit eventsList dragOver, dragDrop, dragExit events
9.List double click eventList double click event
10.Add an Event Listener in MXMLAdd an Event Listener in MXML
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.