drag a file outside a listbox and copy it.

  1. 2 weeks ago

    David C

    Apr 18 Boston, MA

    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 ?

    Take a look at the demo project attached to this feedback case. Feedback Case #16609

  2. Michel B

    Apr 19 Pre-Release Testers, Xojo Pro
    Edited 2 weeks ago by Michel B

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

  3. Jeff T

    Apr 19 Midlands of England, Europe
    Edited 2 weeks ago by Jeff T

    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:

    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.

  4. Sam R

    Apr 19 Pre-Release Testers, Xojo Pro Answer Hengchun, Pingtung, Taiwan

    Take a look at the demo project attached to this feedback case. Feedback Case #16609

  5. Emile S

    Apr 19 Europe (France, Strasbourg)
    Edited 2 weeks ago by Emile S

    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.

  6. Michel B

    Apr 19 Pre-Release Testers, Xojo Pro
    Edited 2 weeks ago by Michel B

    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.

  7. Sam R

    Apr 19 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

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

    Thanks Michel; it means a lot.

  8. David C

    Apr 19 Boston, MA

    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.

  9. David C

    Apr 19 Boston, MA

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

  10. David C

    Apr 19 Boston, MA

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

  11. Sam R

    Apr 19 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    @David C Sam,
    So how do i view the Demo.. do i login to the feedback.app?

    Click the link in the post Feedback Case #16609, then at the bottom of the Feedback window, there is an icon for downloading attachments.

  12. Michel B

    Apr 20 Pre-Release Testers, Xojo Pro
    Edited 2 weeks ago by Michel B

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

    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.

  13. last week

    David C

    Apr 20 Boston, MA

    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]

  14. David C

    Apr 20 Boston, MA

    -image-

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

    thx

  15. Beatrix W

    Apr 20 Pre-Release Testers Europe (Germany)

    What happens if you select Feedback?

  16. Michel B

    Apr 21 Pre-Release Testers, Xojo Pro
    Edited last week by Michel B

    @David C lol but thx

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

  17. David C

    Apr 21 Boston, MA

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

  18. Michel B

    Apr 21 Pre-Release Testers, Xojo Pro

    lol

  19. Norman P

    Apr 21 Xojo Inc

    @David C Bea ...
    When i click on Feedback - I get a feed back login Window.

    I'd suggest reading http://developer.xojo.com/using-feedback
    Feedback is our bug reporting system

  20. David C

    Apr 21 Boston, MA

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

  21. Newer ›

or Sign Up to reply!