DragDropEffects

H

#Hai

Hi,
I'm trying to deal with drag drop technique and get into trouble with
DragDropEffect:
DragDropEffects.Link and DragDropEffects.Scroll. The explanations of MSDN
about them are short and vague:
Link - The data from the drag source is linked to the drop target.
ScrollScrolling - is about to start or is currently occurring in the drop
target.
Can anyone give me a more detail comments about such constants ?

Any help will be appreciated.
 
1

100

Hi Hai,
DragDropEffect give info about what is going to happen if the user drop the
objects on the targed window. They are used mutually used. First the source
tells any potential target which operations are allowable using the
allowedEffects parameter of the DoDragDrop method. And then the targed tells
the source what is going to happen if the user drop the data or it tells
what the user has done (the return value of DoDragDrop). The source uses
drop effects to change the mouse cursor according to the current status of
the operation.
Actually if the source doesn't want to provide some special cursors the only
value which it should take care of is DragDropEffect.Move when it comes as a
return value of DoDragDrop method, be cause it has to delete the object from
its data.
DragDropEffect.Link is the same link operation which is part of OLE (object
linking and embedding). Anyway I don't know a person, who uses this.
DragDropEffects.Scroll should be be set by the target whenever the mouse
cursor is in the "auto scroll" portion of its view (it is scrolling the
view). It should be received in GiveFeedback event only in order the source
to set appropriate cursor for scrolling. I beleave it is senseless to have
this as a return value of DoDragDrop method and if you do I think it should
be considered as a operation cancelation.

HTH
b/rgds
100
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top