<?xml version="1.0"?>
<!-- dragdrop\SimpleListToListMoveSparkDragIndicator.mxml -->
<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"
creationComplete="initApp();">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.ArrayList;
[Bindable]
public var abc:ArrayCollection=new ArrayCollection([{id: "1", value: "one"}]);
private function initApp():void
{
srclist.dataProvider=new ArrayList(['Reading', 'Television', 'Movies']);
//destlist.dataProvider = new ArrayList([]);
}
]]>
</fx:Script>
<s:HGroup>
<s:VGroup>
<s:Label text="Available Activities"/>
<s:List id="srclist"
allowMultipleSelection="true"
dragEnabled="true"
dragMoveEnabled="true"
dropEnabled="true"/>
</s:VGroup>
<s:VGroup>
<s:Label text="Activities I Like"/>
<s:List id="destlist"
allowMultipleSelection="true"
dataProvider="{abc}"
labelField="value"
dragEnabled="true"
dragMoveEnabled="true"
dropEnabled="true"/>
</s:VGroup>
</s:HGroup>
<s:Button id="b1"
label="Reset"
click="initApp();"/>
</s:Application>
No comments:
Post a Comment