WIDGETS - Delete after dragged

Hello all and thanks for the help in advance!

I am creating a widget spawned from drag event (see bprint shot below). My problem is that when I spawn new widgets in this same fashion, the newest image is overlayed over top of the old one.

I’ve tried to remove the widget from parent, on drag end event (confirmed successful fire on this) and even tried setting the IMG variable (texture 2d image in the dragged widget) to a null value. . . . none of which work.

Any pointers? Ultimately I’d like to DELETE the widget after using it, but apparently this isn’t possible, according to another UEAnswers document I read on this - the garbage collector picks up the widget… but I don’t know when or how long that is, and I’ve waited a few seconds doing this methods and its still there.



/friendly bump

Hello am unsure i understand your problem.
But in the case of widgets overlaping / drawn over a other one.

Its due to the ZOrder you can set this in the widget editor or when adding them to viewport.

Hope it helps.

your mistaking what is happening… and I was not all upfront on the image type either. I have .png images with transparency (presumed to be fixed with 4.8 patch on draggable widgets + transparency)… but the problem is that the OLD IMAGE never gets released/deleted. . … I am spawning this same widget class over and over for my DRAGGED ELEMENT, setting its IMAGE property ON DRAG DETECTED function. The problem is, whatever I dragged LAST still remains in the image.

As I’ve said, I’ve set the image variable to a null value, and even tried removing widget from parent (which I cant successfully do for some reason).

WIDGET IS CREATED: From a slot widget that holds place in my inventory system. This widget spawns (as you see in the blueprint) a draggable widget with class INVDRAGGED. I then set the variable for the image.

ON DROP: Transfers a struct class that the DRAGGED widget holds . . . which is irrelevant as its not part of the problem… I’ve tried to REMOVE FROM PARENT on drop of this PAYLOAD… but this for some reason wont work.

WHAT I"VE TRIED: Collecting “ALL WIDGETS OF CLASS TYPE:” node, which for some reason wont even pick up a single widget that matches class INVDRAGGED… so does sthat mean that its getting garbage collected and dumped from memory?