Sign In  Sign Up Live-Chat

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

Last post 06-23-2008, 8:51 AM by emoreau. 3 replies.
Sort Posts: Previous Next
  •  06-12-2008, 7:57 AM 131097

    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).

     
  •  06-17-2008, 10:42 PM 131754 in reply to 131097

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

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

    Thanks for your patience.


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  06-23-2008, 8:40 AM 132561 in reply to 131097

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

    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


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  06-23-2008, 8:51 AM 132563 in reply to 132561

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

    Thanks for the info

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

     
View as RSS news feed in XML