drag a file outside a listbox and copy it.

I would like to click and drag a file outside a listbox and copy it where ever the user releases the mouse.

is there an update to dragover / dragexit ?
https://forum.xojo.com/29293-listbox-dragexit-event/0#p240494

i know the source Folder … How do I get the destination folder after releasing the mouse ?

Windows ? Mac ? AFAIK there is nothing built in Xojo. You will need to use declares.

surely its the recipient that determines what happens when you let go of the mouse?

Did you set the dragitem.folderitem to be an actual folderitem in time for the drag?

The docs arent clear.

In one part it says you can drag text to the desktop, but any other type of data must go in as RawData

Another section of the docs say:

[quote]Dragging Promised Files
OS X supports the concept of dragging a file before it actually exists in the file system. It could be a new document that hasn’t been saved yet or a file that exists on a remote server or on the web.
In these cases, the drag and drop gesture serves the purpose of specifying the location at which to save the new file. When the drag and drop operation is complete, it tells the source where it wants the files saved and the dragging source creates the files. This special type of file drag is called a promise because the drag operation contains a promise from the source to the destination that the source will create the specified files if the drag and drop is accepted.
To drag and drop promised files, call the RectControl or Window’s AcceptRawDataDrop method with “phfs”; as the data type. When an application that sends file promises is dropped on your application, you will find a FolderItem in the dragged item. Usually this will point to a file in the TemporaryItems folder and you should ordinarily delete it when you are finished with it.[/quote]

Take a look at the demo project attached to this feedback case. <https://xojo.com/issue/16609>

I am a bit OT here, but I was able to attach a Picture (drag.Picture = MyTmpPict): very nice !

The Picture holds the data from selected Rows you are currently dragging. This is a simple user interface, I do not save the image.

For dragging a Row from a Listbox… last time I checked, it created as many Clipping text files as you have Rows. I worked a bit more on that (drag image above), but I do not recall my results. Sorry, I do not have that project handly.

Edit:
I forgot to mention that sometimes, when the Finder target window is in list display, the drag does not occured (.Clipping files). Changing that to View as Icons makes the drag working again. I am not sure this is a Xojo bug.

For the longest time, dragging an object to the desktop outright crashed Windows builds. I don’t know if it is still the case.

For Mac, it is fortunate Sam had already done the work. Thanks.

Thanks Michel; it means a lot.

Michel,
i have Mac and Windows Xojo Licenses.
No builds for xojo, will there be a future build maybe for draging?

Sam
A demo? great, fabulous sir… i’ll take a look see.

Jeff,
No i did not set any Drag.FolderItem… i actually don’t know where to start.

Sam,
So how do i view the Demo… do i login to the feedback.app?

[quote=326899:@David Cullins]Sam,
So how do i view the Demo… do i login to the feedback.app?[/quote]
Click the link in the post <https://xojo.com/issue/16609>, then at the bottom of the Feedback window, there is an icon for downloading attachments.

[quote=326896:@David Cullins]Michel,
i have Mac and Windows Xojo Licenses.
No builds for xojo, will there be a future build maybe for draging?[/quote]

I am usually pretty clever at finding workarounds, but frankly this one is getting way out of my league. Sometimes you got to accept the limitations, and do with what is available. At this stage, for Windows, I would suggest a simple SaveAsDialog.

You may want to file a feature request in feedback to ask for it to be built in.

Michel
Ok i will file a feature request.
Drag-n-drop and also Xojo is missing a calender control too … lol but thx

Sam
when i open your link there is no icon, i see
FeedBack
choose other Applicaiton [ choose ]
[ ] Remember my choice for feedback links.

[Cancel] [ open link ]

I do not see an icon to download attachments ?

please advise.[img]

sam i have provided a screen shot of what i am seeing.

thx

What happens if you select Feedback?

Drag and drop the way you want to do it is directly supported by very few languages.

Bea …
When i click on Feedback - I get a feed back login Window.

lol

[quote=327124:@David Cullins]Bea …
When i click on Feedback - I get a feed back login Window.[/quote]
I’d suggest reading http://developer.xojo.com/using-feedback
Feedback is our bug reporting system

ok I found the demo,
there is not much functionality for ListBoxes.