Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsDrag from SWT to Desktop
https://www.eclipse.org/forums/index.php/mv/msg/132525/412360/#msg_412360
Originally posted by: daniel.gaiottino.com
Hi there,
I am trying to work with SWT and find it much easier to work with than
Java SWING. I am having one problem though in my project. I am comverting
an application i wrote with Suns java & swing into SWT and cannot seem to
find how to drag from my SWT application to my desktop.
I had no problem dragging an image from my desktop ontop of a canvas and
then displaying the image on the canvas, but i cant seem to figure out how
to drag an image on a canvas to my desktop. I have enebled Drag from my
canvas and can Drag/Drop between two canvases but not to my desktop or any
other native folder.
Had i gotten the path of where my drop occured then i could just create a
new file there but i am not getting this either.
Could someone show me a snippet for this or let me know how to proceed?
I've read the Drag and Drop articles but didn't get any wiser. A kick in
the right direction would be great.
Thanks,
Daniel]]>2004-01-23T17:27:32-00:00Re: Drag from SWT to Desktop
https://www.eclipse.org/forums/index.php/mv/msg/132525/412541/#msg_412541
FileTransfer or have you written your own image transfer class?
"Daniel Gaiottino" <daniel@gaiottino.com> wrote in message
news:burli4$fq6$1@eclipse.org...
> Hi there,
>
> I am trying to work with SWT and find it much easier to work with than
> Java SWING. I am having one problem though in my project. I am comverting
> an application i wrote with Suns java & swing into SWT and cannot seem to
> find how to drag from my SWT application to my desktop.
>
> I had no problem dragging an image from my desktop ontop of a canvas and
> then displaying the image on the canvas, but i cant seem to figure out how
> to drag an image on a canvas to my desktop. I have enebled Drag from my
> canvas and can Drag/Drop between two canvases but not to my desktop or any
> other native folder.
>
> Had i gotten the path of where my drop occured then i could just create a
> new file there but i am not getting this either.
>
> Could someone show me a snippet for this or let me know how to proceed?
> I've read the Drag and Drop articles but didn't get any wiser. A kick in
> the right direction would be great.
>
> Thanks,
> Daniel
>]]>Veronika Irvine2004-01-26T13:03:56-00:00Re: Drag from SWT to Desktop
https://www.eclipse.org/forums/index.php/mv/msg/132525/415398/#msg_415398
> I am trying to work with SWT and find it much easier to work with than
> Java SWING.
Right. Swing is easier to use. But SWT seems to be better - or else you
wouldn't be using it, would you?
> I am having one problem though in my project. I am comverting
> an application i wrote with Suns java & swing into SWT and cannot seem to
> find how to drag from my SWT application to my desktop.
>
> I had no problem dragging an image from my desktop ontop of a canvas and
> then displaying the image on the canvas, but i cant seem to figure out how
> to drag an image on a canvas to my desktop. I have enebled Drag from my
> canvas and can Drag/Drop between two canvases but not to my desktop or any
> other native folder.
>
> Had i gotten the path of where my drop occured then i could just create a
> new file there but i am not getting this either.
>
> Could someone show me a snippet for this or let me know how to proceed?
> I've read the Drag and Drop articles but didn't get any wiser. A kick in
> the right direction would be great.
Well, you're doing file transfer Drag and Drop here, right?
There are lots of snippets around about this. (On the snippet page of
course)
Uh, I see I'm wrong here ;-) Never mind.
Unfortunately I don't have any simple sample. The only one I have is quite
complicated so I won't send it.
Simon]]>Simon Rutishauser2004-01-31T21:42:48-00:00Re: Drag from SWT to Desktop
https://www.eclipse.org/forums/index.php/mv/msg/132525/1050240/#msg_1050240
I've posted some example code on StackOverflow, but I can't link to it because I don't have enough cred on the Eclipse.org forums... Here's the URL for copy-pasting: