• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dragging a file from swt to windows file system  RSS feed

 
sushil grover
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We have a application where we display a list of files in SWT widget. We need to add one functionality to drag and drop from the file system to SWT and vice versa.
Drag drop from file system to SWT we have already implemented. But i am not sure how to implement the other part. Dragging a file out of SWT application.


Please provide your suggestions...

Thanks...
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you could use this for both...

I think you need to "accept" the drop before requesting the List, something like:

dropTargetDropEvent.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);

In addition to acceptDrop(), you should also call dropComplete() when finished.

,
cc11rocks AKA John Price
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!