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>
<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>