[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Drag and drop woes

The drag effect is just a hint of the items being dragged. On some platforms the drag data is null until the drop occurs (not when the drag starts). That means dragSetData is called when the mouse is released. It's an optimization to prevent data from being created unnecessarily since it may not be used if a drop failed for whatever reason.

If you have access to the dragSource, you can set the dragEffect to null to turn off the drag effect.

Duong

David Huebel wrote:

Duong,

Thank you for the suggestions.  Sorry for the bogus report.  I used this
wonderful program to figure out that I wasn't actually setting the data
after all:

http://mi.eng.cam.ac.uk/~er258/code/x11.html

I find the drag effect provided by Eclipse to be most confusing. It appears
to use a graphical copy of the currently displayed part of the current
selection. Not only did it show me dragging the current selection when in
fact the drag data was null, but when I select several screenfuls of data
in my TableViewer, it shows me dragging just the few rows that are on the
screen when I initiate the drag. It could be very confusing to users who
go through many screenfuls of data ctrl-clicking the rows they want, and
then see only one row being dragged. Is there any way to turn this effect
off?

-David