现在的位置: 首页 > 综合 > 正文

Flex拖放

2013年08月24日 ⁄ 综合 ⁄ 共 1295字 ⁄ 字号 评论关闭
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
	<s:layout>
		<s:HorizontalLayout paddingLeft="20" paddingTop="20"/>
	</s:layout>
	<fx:Declarations>
		<s:ArrayCollection id="authors">
			<fx:Object label="A" telephone="1"/>
			<fx:Object label="B" telephone="2"/>
			<fx:Object label="C" telephone="3"/>
			<fx:Object label="D" telephone="4"/>
			<fx:Object label="E" telephone="5"/>
		</s:ArrayCollection>
	</fx:Declarations>
	<mx:DataGrid dataProvider="{authors}" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" allowMultipleSelection="true">
		<mx:columns>
			<mx:DataGridColumn headerText="Label" dataField="label"/>
			<mx:DataGridColumn headerText="Telephone" dataField="telephone"/>
		</mx:columns>
	</mx:DataGrid>
	<s:VGroup>
		<s:Label fontWeight="bold" text="source"/>
		<s:List dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" allowMultipleSelection="true" dataProvider="{authors}"/>
	</s:VGroup>
	<s:VGroup>
		<s:Label fontWeight="bold" text="Target"/>
		<s:List dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" allowMultipleSelection="true" dataProvider="{new ArrayCollection()}"/>
	</s:VGroup>
</s:Application>

dragEnabled="true" 

dropEnabled="true" 

dragMoveEnabled="true" 

allowMultipleSelection="true"

抱歉!评论已关闭.