We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Detecting if it is a file or a folder that is being dropped

Hi

Using the FileDropTargetManager, is it possible to detect in the DragOver (or DragEnter) event if the item being dropped is a file or folder?

I have a treeview on which I want to allow drop a file but not a folder so I want to change the e.Effect to provide a visual cue of that.

Don't forget that I can also drag multiple items (2 files and 1 folder) in a single drag operation in which I would want the Effect to allow "DragDropEffects.Copy" (and I handle myself in the DragDrop event if it is a file or a folder).

We are working on your issue. We will get back to you ASAP.

Thanks for your patience.

Hello,

We cannot tell the difference between dropping a folder or multiple files. I cannot see any APIs to support that. They provide the same results for multiple file items and a folder with files.

Thanks

Thanks for the info

I have worked around this issue by checking "IO.Directory.Exists(filename)" in the DragDrop event.