UMG - Drag&Drop capturing mouse events.

Any chance that someone could post a small test level with this working so that we can study it and learn from it?


I realized my stuff completely without that dragdropoperator stuff because of the fullscreenstuff

Is it possible to center the dragged widget on the mouse cursor when using the DragDropOperation function (which seems to take the clicked position and uses it to move/drag the widget)?

I know it’s possible if the drag movement is calculated manually using the GetMousePositon and SetPosition functions for the widget, but I can’t find a way to make any position adjustments using the DragDropOperation function.

Is it possible? And if so, how?


This crashed for me on iOS IPhone 6 (works in mobile preview) when I create a Drag Drop Operation. Anyone else have this issue? (or not?)

I noticed a problem I get with this when combining it with my UMG inventory, after having begun dragging a slot item(InventorySlot widget) it thinks it is still being hovered after moving the mouse and even dropping the widget in another slot which makes the style change from what I want (the “normal” style) to something “corrupt” on the widget I dragged from.
Anyone else experienced this and fixed it?

Kind Regards,

Yes, should be fixed in 4.7. We changed Slate to always fire a mouse leave when a drag operation begins to prevent those sorts of style hangups.

Great to hear Nick!
Can’t wait for 4.7 to come out as full release :slight_smile:

I’ve just tried 4.7 and the black squared alpha problem i mentioned earlier is still present, is there any workaround for that? Thank you

Fixed in 4.8, the 4.7 system is still limited to drag drop only working in windowed mode games. The only work around is to implement your own drag/drop system moving everything yourself in another higher layer canvas/overlay.

I ran into the issue that the Drop event is on the receiving Widget, not the Wdiget being dragged. Once I got that it worked.


Is there a way to know when a Drag Over is completed (e.g. Drag Over Leave function).


Let’s say I want to highlight an icon with a color when hovering on top of it and dragging another icon. I can use the Drag Over function and change the color of the icon to red, but it seems that there’s no way to detect when the Drag Over is completed and hence let me change the color back to it’s default state.

Are these 2 functions what I am looking for, and if so, are you planning to expose them in Blueprint?




Tried to implement this today and I’m running into the black square problem.

Hey Nick,
The post is which version of the engine?
My engine is UE4.76,Can’t implement drag-and-drop in that way,what should I do?
please help me!

How would you do this with re-adding the dropped widget back to its parent, if the parent is a canvas panel?

hello eveyone can you help please

If you want some help, you’re going to have to give us a bit more info…

I’ve tried make drag for mobile and i cannot implement that (touch release = Click) and if (touch move = drag). Do you have any suggestions?