Share on Google+Share on Google+

Flex Drag Drop Component

Advertisement
In this tutorial you will get to know about drag drop Component in Flex. Examples will illustrate this component.

 

Flex  Drag and Drop Component:

The Flex 4 Drag and Drop is a process for selecting an item from a list or component and move on mouse pointer  and drop when release mouse pointer. Item are put from one position to another position or one list  to another list.

For example :-

<?xml version="1.0"?>

<!-- dragdrop\SimpleTreeSelf.mxml -->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>

<![CDATA[

private function initApp():void {

treeList.dataProvider = DP;

}

]]>

</mx:Script>

<mx:XML id="DP">

<node label="Name">

<node label="Deepak"/>

<node label="Ravi kant"/>

<node label="Brijesh"/>

<node label="Avanish"/>

</node>

</mx:XML>

<mx:Tree id="treeList"

showRoot="false"

labelField="@label"

dragEnabled="true"

dropEnabled="true"

allowMultipleSelection="true"

creationComplete="initApp();"/>

</mx:Application>

Output:

Advertisements

Posted on: March 11, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.