Set/Clear DragTooltipContent

2 posts, 0 answers
  1. Justin Lee
    Justin Lee avatar
    149 posts
    Member since:
    Dec 2009

    Posted 06 Oct 2010 Link to this post

    I have a TreeView where the user drags a node and drops it on a Label.  When they drag over the label, I set the DragTooltipContent to some text about the label, and set IsDropPossible to true in the OnDropQuery Handler.  This works fine, but if they move the cursor off the label, the text is still displayed, and the arrow image (drop is allowed) is still displayed.  How do I reset the DragTooltip when they leave the label without dropping?

    void lblContextName_OnDropQuery(object sender, DragDropQueryEventArgs e)
    {
       Label lbl = (Label)sender;
       ((TreeViewDragCue)e.Options.DragCue).DragTooltipContent = 
             "Add to '" + lbl.Content + "'";
      
       ((TreeViewDragCue)e.Options.DragCue).IsDropPossible = true;
                  
       e.QueryResult = true;
    }
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 12 Oct 2010 Link to this post

    Hi Justin Lee,

    It is best to move your logic into the OnDropInfo() event handler and set the e.Options.DragCue properties accordingly to the status of the Drag/Drop operation - DropPossible and DropImpossible. I updated the project I attached to the other thread you started to illustrate this approach.

    Also, you can have a look at the sequence of the RadDragAndDropManager events here. I hope this helps. Please let us know if we can further assist you.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top