List double click event : List Event « Components « Flex






List double click event

List double click event
           

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="horizontal">
  <mx:Script>
    
        import mx.controls.Alert;
    private function onDoubleClick( event:Event ) : void {
          Alert.show(String(theList.selectedItem) );
    }
    
  </mx:Script>
  <mx:List id="theList" width="300" doubleClick="onDoubleClick(event);" doubleClickEnabled="true">
    <mx:dataProvider>
      <mx:Array>
        <mx:String>A</mx:String>
        <mx:String>B</mx:String>
        <mx:String>C</mx:String>
      </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.List change eventList change event
5.Get selected item from a list from change eventGet selected item from a list from change event
6.Convert event target to List controlConvert event target to List control
7.Write your event listener to access the event objectWrite your event listener to access the event object
8.A data-binding watcher invokes an event listener when a binding occurs.A data-binding watcher invokes an event listener when a binding occurs.
9.List dragOver, dragDrop, dragExit eventsList dragOver, dragDrop, dragExit events
10.Add an Event Listener in MXMLAdd an Event Listener in MXML