Is Drag And Drop not working?

I used the example given at Supporting drag and drop — Xojo documentation to make a simple app that add a file name to the listbox (desktop listbox).

And it’s not working?

I add the filetypegroup Any
I add the Opening AcceptFileDrop Any
I add the DropObject portion?

No error but nothing happens when I drag and drop file from explorer either? Is this a case of something changed but Xojo didn’t update the Doc? (since it happened before with database object).

Xojo Lite version 2025 Release 1.1

Share the project.

Don’t forget to add the OS version and Xojo version…

Did you do the events on the list box or the window?

To the listbox, as the doc suggest.

DropTest.zip (4.8 KB)

Attached. Just a basic app to test the doc / drag drop.

Xojo 2025 Release 1.1 Desktop Lite, Windows 11

agree this filetype any to nothing in Xojo 2025r1.1 and Windows 11.
you could add text or image mime types (by your need) in the FileTypeGroup1 and use Me.AcceptFileDrop(FileTypeGroup1.All)

1 Like

Works fine on macOS

and for Windows, you need to use “.” for extension to make it work.

1 Like

On macOS, all I get are the file names of the dropped (text) file…

The Languare reference is your friend to import txt contents into ListBox / There are examples to import a disk folder structure)

What do you want to do ?

Must be *.* to work. The forum software removed the stars.

Thanks to all, I guess it is bugs or room for improvements. I wish I can mark multiple as solutions.

On Windows, adding Any should automatically add the asterik, because there is no case where there must be specific filename but extension can be anything. And the tutorial I linked should also mentioned that All can be used too because following it directly no longer works, as of now.

FWIW, Any means “any type possible”. All means “all types defined in this file type group” so they’re not the same.

2 Likes

Right, but I’m sometimes confused by these two, too.