Widget Dissappears when dragged offscreen

Widget Disappears when dragged off-screen

I found some other threads about this issue mentioning that the “tick” no longer works for the widget when dragged outside the viewport and that I should use a timer instead.

found some threads with some blueprint code that is supposed to fix it… but it not working correctly for me.

so have a couple questions…

  1. where should that timer(and the event called by the timer) be located? (child widget or the parent widget)

  2. I am guessing the timer should call an event or function… but what should that event code look like? what exactly needs to be happening… should I be preventing the widget from leaving screen by checking its x/y cords every frame? or should I simply re-create the widget if it leaves the screen?

I actually tried both ways… but it doesn’t seem like I can get the widget cords while in “Dragged” mode (only after the mouse has been released does it give me the widgets x/y cords) so I cannot prevent it from being dragged offscreen.

Perhaps once the widget is dropped, you could check it’s coords, and fix it’s position if outside of screen. Regarding fetching the coords while being dragged, it might help us to know exactly how you are dragging the widget. Could you post some screenshots of that?

As for your first question, this really depends on your setup, but either should work fine.