drag and drop on canvas

i try to drag and drop but on windows show i icon the drag is disable how i enable

Forum search is your friend

https://forum.xojo.com/12380-drag-and-drop/0

hi
i can load the pic from my pc but when i connect my iphone and see the pic i can no load the pics

[quote=252128:@Alexis Colon Lugo]hi
i can load the pic from my pc but when i connect my iphone and see the pic i can no load the pics[/quote]
Interesting. I hadn’t tried it before but you are correct, Alexis. On Windows, you can’t seem to drop an image dragged from an iPhone to a Canvas.

I have a test app that I use which has a canvas set to accept any type of file (special/any). When I drag an image from the iPhone to the canvas, it doesn’t even see that there is a drag/drop being tried. Yet dragging the image to a window on the machine and from there to the app’s canvas works fine.

Can someone with a Mac try it, please?

If you mean drag it from iTunes, I am not surprised. It is quite different to drag a file from the explorer, and from an app.

If you want to drag a picture from Windows Photos, you need to add

me.AcceptPictureDrop

in the Open event of the canvas.

i am drag and drop from windows explorer but with iPhone path .

i fix this was a bug on XOJO 2015 r3.1 with XOJO r2.4 works perfect

thanks

No, Michel, I mean from the Windows Explorer when the iPhone is plugged in via USB. The canvas’ open event has

me.AcceptFileDrop("special/any") me.AcceptTextDrop me.AcceptPictureDrop
and accepts most anything.

Looking at the Windows Explorer it seems like the iPhone is mounted as a Portable Device rather than a drive. I guess windows knows how to deal with it but trying to drag from the iPhone directly to the canvas doesn’t work. Strange!

  • Dale

Indeed when the phone is opened as a disk, dragging a file from there does not work. In DragEnter obj.folderItem is nil, and obj.pictureAvailable is false.

Copying to a folder works just fine.

A possible workaround is to create a folder to drop the file into, and monitor its content with a timer. When a file is dragged into it, get the file as a folderItem member of the folder.