Creation of widget as tooltip

Greetings,

I am new to Unreal and I have started coding via blueprints. I have a simple question about tooltips. I’ve made a tooltip to show by creating a widget when it gets hovered (that is the solution i could make it to work), but when i live debug it, every time it creates a new widget, a different one. I’ve made a on mouse leave event, to remove widget from parent, but still looks like it doesn’t get removed.
Am I using the wrong node to remove it, or my whole logic around it is wrong.

1 Like

This mostly might be the problem. You see, in coding(programming) the code gets executed instantly upon running. They can run thousands of arrays in milliseconds. So, when you create a widget on hovered you might create hundreds or thousands of new widgets that get layered upon hovered.

And when you try to remove it, some number of them will get removed, but not the same number of created widgets.

To solve this, you will need to use Flow Control. Flow control is really important in programming to avoid redundancy and logical errors. You can utilize flow control to create only one widget instead of thousands. Which one to use? It depends on how you design your workflow.

Hello! Can you share a screenshot of your blueprint nodes that you are using? That way we can help you out more efficiently :smile:

Widgets handle custom tooltips like so:

image

Which gives you a chance to:

You can expose variables on that widget to pipe in data. From now on a tooltip widget will be created and destroyed automagically.