Flex列表拖拽效果

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp()" layout="absolute">
 <mx:Script>
  <![CDATA[
   private function initApp():void
   {
    list1.dataProvider = ['aa','bb','cc','dd','ee'];
    list2.dataProvider=[];
   }
  ]]>
 </mx:Script>
 <mx:Panel width="500" height="500" title="拖拽实例">
  <mx:HBox>
   
   <mx:VBox>
    <mx:Label text="左列表"/>
    <mx:List id="list1" width="200" height="350"  allowMultipleSelection="true" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"/>
   </mx:VBox>
   <mx:VBox>
    <mx:Label text="右列表"/>
    <mx:List id="list2" width="200" height="350"  allowMultipleSelection="true" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"/>
   </mx:VBox>
  </mx:HBox>
  
 </mx:Panel>
</mx:Application>
posted @ 2010-07-29 16:37  只身走天下  阅读(410)  评论(0)    收藏  举报