3

I have a grid of items that can be rearranged by drag & drop. After the drop is performed I need to call a function. The DropDelegate works great for this when the drop is performed on one of these draggable items. The problem is that I still need to call the function even if the drop occurs somewhere else (any other view or outside of the app's window on macOS).

Is there any way to get notified no matter where the drop occured? I don't need any other information apart from that it happend. Or is this simply impossible?

Things I have tried:

  1. Adding another DropDelegate to other views of the app to detect the drop there. Problem: Does not work when item is dragged outside of app window.
  2. Tried to call the function if dropExited is not immediately followed by dropEntered on one of the items. This does not work because the user might drag outside the view temporarily and the function would be called to soon. Also it seems pretty hacky.
viedev
  • 869
  • 1
  • 6
  • 16

0 Answers0