File Drag and Drop on component under another

gui

#1

Is there a way to allow file drag and drop on a component thats underneath another component (not a child of)?


Drag and Drop container under another component
Drag and Drop container under another component
#2

Any component can be a DragAndDropTarget, it doesn’t matter where it is in the hierarchy. So I don’t quite understand your question, maybe try explaining better what you mean?


#3

Hi Jules,
So I have a component that sits completely over an app for doing notifications, toasts e.t.c. and underneath that I have a media player with I want to use as Drag and Drop target.

When I remove the notifications component d&d works - I add the notification component but d&d stops working. Is there a way of allowing d&d to propagate to components underneath. I have set isInterestedInFileDrag to false for the notification component but was wondering if the component could be ignored entirely…

Hope that explains the problem.


#4

Maybe you just need to disable hit-testing for the overlay, so that mouse events can get through? e.g. with Component::setInterceptsMouseClicks or overriding Component::hitTest()


#5

Sounds like exactly what I’m after cheers.