Download

Widget Component - Drag and Drop not work

Hello!

I have UMG widget with draggable item. If I add it to viewport it work correctly. But if it added to Widget Component it not work.
Debug cursor react on hovering widget (red spot becomes larger) but widget element not react on drag event.
Is Widget Component has any “hidden” options to activate drag events?

UMG element is Text Box in Border element. I can print text in Text Box if it on Widget Component but cant drag wrap border.
On viewport all work correct.

Use UE 4.14.1 source code and blueprints only.

Drag and drop isn’t implemented for VR, it requires slate application to manage it in a much different way than it does for standard applications.

Thanks for reply Nick. I do not use VR. Project use default template.

You will need to post some screenshots if we are to be able to track down the issue.
Most relevant I think would be:
designer window, including hierarchy, of the umg widget, draggable item and the widget you add it to.
Also how you detect the drag and the drag drop operation.

Thanks for reply ste1nar.

My Blueprints and results:

&stc=1&d=1484171876
&stc=1&d=1484171971
widget.jpg&stc=1&d=1484171942
&stc=1&d=1484171916
&stc=1&d=1484171963
&stc=1&d=1484171928

widget addd to viewport.gif
widget added to Widget Component.gif

Sorry, I did not realize this was for widget components, something I have not begun to learn yet.
However, messing around with it a bit, when you click the “add component” and search for widget, there’s this widget interaction component, and it says “… you’ll then tell the component to simulate key presses…”.
So I guess using on mouse button down, which works on a widget added to the view port, does not work with the widget component. So you need to use this widget interaction component for that.
The widget interaction component has an event called “onhoveredwidgetchanged” so that you can get a reference to the hovered widget.

And here’s some links but maybe you already read through them.

I thought that all this should work automatically because the operating logic is there in the widget.
Thanks for info ste1nar. I will try as you say.

Hurray!
It work if call functions from draggable widget. I bind these functions to mouse events via WidgetInteractionComponent and it worked.
But now I need to create a new algorithm for calculating the coordinates but that math only =)

Thanks for all for answers!