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

Set/Clear DragTooltipContent

1 Answer 28 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Justin Lee
Top achievements
Rank 1
Justin Lee asked on 06 Oct 2010, 05:28 PM
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;
}

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 12 Oct 2010, 09:25 AM
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
Tags
TreeView
Asked by
Justin Lee
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or