Original droptarget?

Nov 19, 2009 at 4:33 PM

Hi,

Great tool, it's been a lifesaver for me!

I'm handling the DragSourceDropped event and I'm wondering if there's a way to establish the original droptarget of the dragsource before it was dropped?  Or is there a way of working out the droptarget of a dragsource in it's DragStarted event?

Thanks,

Emma

Coordinator
Nov 22, 2009 at 9:53 AM

Hello,

this functionality is not included at the moment, but I think it should be possible to modify the source (when the drag starts) to make it include a reference to the original target.  Another way, probably easier, would be to add an event to the droptarget itself, which fires on drag started, in which you can get the droptarget through the "sender" parameter.  

I'll consider this as a request for a future version! :)

 

Kind regards,
Kev. 

Nov 27, 2009 at 8:40 AM

Thanks very much, this would be a great feature to have.   For now, I've worked around it by using tags - I give each droptarget a tag and when a dragsource is dropped on it, I make it's tag the same.  When I drop it somewhere else, I use LINQ to find it:

dtrgt = From d As DropTarget In Board.Children.Where(Function(c As DropTarget) c.Tag = ds.Tag)

Thanks,

Emma