Implement Drag and drop

Implement Drag and drop

Hi......

Please give the answer with example

How do you implement drag and drop on components that do not support ondrag and ondrop?


Thanks in advance

View Answers

October 15, 2010 at 12:46 PM

Ans: The example are following which does not support the ondrag and ondrop

<?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">
<fx:Script>
<![CDATA[
import mx.managers.DragManager;
import mx.core.DragSource;
import mx.events.DragEvent;
import flash.events.MouseEvent;
// initialize the drag and drop operation
private function mouseMoveHandler(event:MouseEvent):void
{
var dragInitiator:Button=Button(event.currentTarget);
var dragSource:DragSource = new DragSource();
dragSource.addData(dragInitiator, "button");
DragManager.doDrag(dragInitiator, dragSource, event);
}
private function dragEnterHandler(event:DragEvent):void {
if (event.dragSource.hasFormat("button"))
{
DragManager.acceptDragDrop(Panel(event.currentTarget));
}
}
private function dragDropHandler(event:DragEvent):void {
Button(event.dragInitiator).x =
Panel(event.currentTarget).mouseX;
Button(event.dragInitiator).y =
Panel(event.currentTarget).mouseY;
}
]]>
</fx:Script>
<s:Panel title="Flex component move using drag and drop"
width="386" height="282"
chromeColor="#555555"
color="#CCCCCC"
dragEnter="dragEnterHandler(event);"
dragDrop="dragDropHandler(event);">
<s:Button id="btn" label="Drag Button"
mouseMove="mouseMoveHandler(event)"/>
</s:Panel>
</s:Application>









Related Tutorials/Questions & Answers:
Implement Drag and drop
Implement Drag and drop  Hi...... Please give the answer with example How do you implement drag and drop on components that do not support ondrag and ondrop? Thanks in advance   Ans: The example
drag n drop - JSP-Servlet
drag n drop  I want to implement drag n drop functionality for simple HTML/JSP without using applet,flash or any heavy components.using browse button... using drag and drop mode.when user drag n drop file then display the complete path
Advertisements
Ajax drag and drop
Ajax drag and drop  Hi, How to develop Ajax drag and drop example... and Droppable jQuery UI Interaction to perform drag and drop operations. In the above urls you will find the example of Ajax drag and drop operations. Thanks
Drag and drop file uploading - Ajax
Drag and drop file uploading  Hi all, This is NageswaraRao i want file uploading feature on my web development..using drag and drop mouse functionality. Problem:I have Created one Text area when i drop the file on text area
Drag and Drop file upload in DOJO
Drag and Drop file upload in DOJO  Hi, We are working with DOJO for creating the UI for the web application.Our requirement is "Drag and Drop files from desktop to the browser for upload". Is this feature supported in DOJO? Any
javascript drag drop treeview - Ajax
javascript drag drop treeview  Hello Friends, I want to create...(); }   Drag Drop Example   Select any part of this text box to drag Drag <==> Drop
Drag and Drop Example in SWT
Drag and Drop Example in SWT       Drag and Drop in Java - This section is going to illustrates you how to create a program to drag and drop the tree item in Java . In SWT
Dojo drag and drop
Dojo drag and drop         In this section, you will learn about dojo drag and drop. Drag and Drop: This is a technique of dragging an item. Click an object
Drag and Drop in Flex4
Drag and Drop in Flex4: Drag and Drop is the operation in which you can drag and drop an item or component in to another component. The drag and drop.... There are three stages of drag and drop operation which are following: 1. Initiation 2
Flex Drag Drop 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
Drag and Drop using java - Java Beginners
Drag and Drop using java   In this program the component location...()); } public void drop(DropTargetDropEvent ev) { ev.acceptDrop... static void main(String[] arg) { Button button = new Button("Drag
Java Swing Drag drop - Swing AWT
Java Swing Drag drop  Hi i have following code that can help to drag abd drop , The code is also from Roseindia,net I want to keep orignal componant on frame after drag please help me import java.awt.*; import
how to use javascript drag and drop files upload - Ajax
how to use javascript drag and drop files upload  Hi,Sir Please, I would like to upload multiple files using javascript with drag and drop style.I... for upload files in drag and drop style instead of using javascript.But I need
Mouse Drag and Drop
Mouse Drag and Drop       This section illustrates you how to drag and move mouse to draw a figure. To draw a figure using drag and drop, we have used Rectangle2D class to draw
Two way drag and drop in Flex`
  Flex Two Way Drag and Drop :- In this tutorial you can see two way drag and drop for list based controls. In this example we can set dragEnabled="...;  for both lists as you can see in this example.ADS_TO_REPLACE_1 Two-way Drag
Drag and Drop in the same control in Flex4
Drag and Drop in the same control in Flex4: We use the three property dragEnabled, dropEnabled and dragMoveEnabled for performing drag and drop operation. In this example you can see how we can drag and drop the item in the same
Flex component move using drag and drop in Flex4
Flex component move using drag and drop in Flex4: In this example you can see how we can drag and drop the component from one place to another. There are the three classes of drag and drop operation: 1. DragManager: It manages
Flex Component Move with the help of drag and drop
Flex Button Drag and Drop with X and Y Co-ordinate :- In this tutorial you can  drag and drop for button with x and y co-ordinate or move one place to another in container. In this tutorial we can explain how to use Drag Manager
steps to create desktop application in java swing using eclipse with drag and drop options
steps to create desktop application in java swing using eclipse with drag and drop options  please help to create desktop application in java swing using eclipse with drag and drop and what are the plugins required
Copying and Moving data using drag and drop
Copying and Moving data using drag and drop: You can drag and drop the data... move data and add it to the drop target it will be removed from draginitiator and show in drop target. When you copy data and add it to the drop target
Drag and Drop between two list control in Flex4
Drag and Drop between two list control in Flex4: In this example you can see how the data items of list are drag and drop from one list to another list... title="Drag and drop between two list control" chromeColor="
How to create runtime drag and drop form builder using asp.net mvc and jquery
How to create runtime drag and drop form builder using asp.net mvc and jquery  My task is related to Runtime drag and drop Form Builder. I have to design a dynamic form builder in which user has permission to drag the control
Drag and Drop components from one frame to another frame
Drag and Drop components from one frame to another frame... that how to drag and drop component (drop down list, text area, check box, radio..., user can drag and drop component from one to another frame. Download Source
flex didn't know how to drag and drop video and audio in flip book - Framework
flex didn't know how to drag and drop video and audio in flip book  hello sir in my project in flex flip book it is book which can be flip.our target to add the video audio and photo in this book i am able to add the photo
Drag Manager in flex
: The DragManager class manage drag and drop operation in which you can move...Drag Manager in flex  HI... Please tell me about What is a drag... control, and then drag it over another component to add it to that component
Java Swing drag image
Java Swing drag image Java Swing provides several classes that will allows us to drag and drop components(drop down list, text area, check box, radio button... to drag an image from one panel to another. For this, we have used two images. One
Implement push
Implement push  Hi.. How do you implement push on a flex applications? give me answer with example so i clearly understand Thanks  Ans: push implement on a flex applications using BlazeDS Server
Drop Box
Drop Box  program draw 2d shapes in java
Drop Box
Drop Box  program draw 2d shapes in java
Implement push
Implement push  hi....... just tell me about How do you implement push with flex data services? give me answer with example Thanks  Ans: Using BlazeDS Server and Live Cycle Data Services
drop down
drop down  how can i add data from choice/dropdown component of java awt to myaql table
Drop Down
Drop Down  How to insert date into database using dropdown like facebook
Drag from DIV overflow - Ajax
Drag from DIV overflow  Hello All, I have Two html DIVs to use. What i want to do is click and drag item from First DIV and drop in Second DIV. I use style sheet "overflow: auto" for both DIVs. So whenever i drag any item
how to drag top most images which is draw on applet.
how to drag top most images which is draw on applet.  Please help me, I have draw 83 images one by one from g.drawImages(,,,,); now I want to drag last image from 83 images and drop it suitable place, Now please help me , how can
Specify the drag indicator by using the DragManager
roseindiaImage:Class; // initialize the drag and drop operationADS...Specify the drag indicator by using the DragManager : In this example we must specify a size for the drag indicator. In this example we use a doDrag
Drag a Text Box into dynamic positions
Drag a Text Box into dynamic positions  Plz can anyone tell how can i drag a text box using mouse or arrow keys... Im doing a accounts projects and i need this feature for cheque configuration
drop down menu
drop down menu  drop down menu using html
how to custom location of a object after dragging to the drop target
how to drag the object inside the drop target. (that means how to change...how to custom location of a object after dragging to the drop target  how to change the position of a button when after it drags on the drop target
Implement the Serializable Interface
Implement the Serializable Interface  hii How many methods do u implement if implement the Serializable Interface?   hiii,ADS_TO_REPLACE_1... of its own to implement
Implement an interface in a JSP
Implement an interface in a JSP  Can we implement an interface in a JSP?   
Implement transaction serializability
Implement transaction serializability  I need to implement transaction serializability in Java using semaphores/monnitors. What is the code to do
drop down list in Struts
drop down list in Struts  How to create a drop down list in Struts
DROP a table and TRUNCATE
DROP a table and TRUNCATE   What are the differences between DROP a table and TRUNCATE a table
Drop Table
Drop Table       Drop Table in SQL get rid of an object or table from the database. Using a drop Query... from database. The Drop table cannot get it back, once you run the drop Query
ModuleNotFoundError: No module named 'drop'
ModuleNotFoundError: No module named 'drop'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'drop' How to remove the ModuleNotFoundError: No module named 'drop' error
Where to implement spring - Spring
Where to implement spring   Hi, Where we implement spring framework in j2ee appplication. I mean which layer .Thanks
Version of com.klinkerapps>drag-dismiss-activity dependency
List of Version of com.klinkerapps>drag-dismiss-activity dependency
ModuleNotFoundError: No module named 'fga-drag-racer'
ModuleNotFoundError: No module named 'fga-drag-racer'  Hi, My... named 'fga-drag-racer' How to remove the ModuleNotFoundError: No module named 'fga-drag-racer' error? Thanks   Hi, In your python
Drop Index
Drop Index       Drop.... Understand with ExampleADS_TO_REPLACE_1 The Tutorial illustrate an example from Drop..._table(stu_id); Drop Index THE drop index stu_index 1 is used
implement microsoft office
implement microsoft office   how implement microsoft office in my java swing project ,or when microsoft office is not install then file open in defualt text editar.please send me source code

Ads