Changing drag cue

3 posts, 0 answers
  1. Swati Allen
    Swati Allen avatar
    2 posts
    Member since:
    Dec 2009

    Posted 01 Dec 2009 Link to this post

    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. Swati Allen
    Swati Allen avatar
    2 posts
    Member since:
    Dec 2009

    Posted 01 Dec 2009 Link to this post

    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
  3. DevCraft banner
  4. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 04 Dec 2009 Link to this post

    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.
Back to Top