This is a migrated thread and some comments may be shown as answers.

Changing drag cue

2 Answers 82 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Swati Allen
Top achievements
Rank 1
Swati Allen asked on 01 Dec 2009, 11:45 PM
I am adding drag and drop to my application. Only certain componets can be drag sources and other components can be drag targets. When the user drags an object over a target I want to update the drag cue to reflect whether or not it can be dropped and what will happen if the user drops the object here. I can easily change the drag cue when I drag over a valid drop target but I can not figure out what combination of event/status to use to set the drag cue back to the default when the user drags away from the drag target without actually dropping the object.

Any help would be appreciated...

Thanks

2 Answers, 1 is accepted

Sort by
0
Swati Allen
Top achievements
Rank 1
answered on 02 Dec 2009, 02:55 AM
Never mind, I think I have this working now. Here is what I do.

On the drag source I capture DragQuery events and handle DragStatus.DragQuery and DragStatus.DropSourceQuery.
On the drag targets I capture DropQuery and DropInfo events. For DropQuery I handle DragStatus.DropDestinationQuery.
For the DropInfo events I handle:
    DropPossible to change the drag cue to let the user know this is a valid drop target and what will happen.
    DropImpossible to change the drag cue back to the default when the mouse is moved off the drop target
    DropComplete to process the actual drop

Does this sound correct?

Thanks
0
Kiril Stanoev
Telerik team
answered on 04 Dec 2009, 11:43 AM
Hello Swati,

Sorry for the late response. Everything you described seems to be correct. However, if you experience any difficulties, let us know. We'd be glad to assist you.

All the best,
Kiril Stanoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
DragAndDrop
Asked by
Swati Allen
Top achievements
Rank 1
Answers by
Swati Allen
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or