wx.FileDropTarget disabling and Mac filetypes

Could you just have a single drop target that redirects the files to the
one list and the folders to another? I would also imagine that some
user would attempt to drag files and folders simultaneously, and would
perhaps be miffed that they couldn't drop it into either control.

- Josiah

···

Patrick Mineault <lists@5etdemi.com> wrote:

In my wxPython app, a user can drag folders and files onto a listbox to
add it to the list. That works well, except I want the dropping to be
disabled based on certain conditions. Namely, whether the files are
really files or dirs (only allow files in one control, and only allow
dirs in another). Currently I check if the file is right in OnFilesDrop,
but I would like to check it earlier so as not to allow it altogether
instead of after the fact. My code looks like: