custom tooltip widget

hi

if you create a custom tooltip text widget to display tooltip text bigger because the original / default tooltip is too small

what exactly must you do

it seems merely creating the custom widget (construct widget) and assigning the new widget to the parent widget it is the tooltip of (set tool tip) is not enough

if you use the set tool tip (target is widget) node, will it create the binding for you or not

thanks

1 Like

Not sure I got it. Is this how you’re doing it?

well

i created buttons and what have you in blueprint
created a part of a main widget / populated a main widget in blueprint because it seemed the smart thing to do
now i realize i need to add custom tooltips to the buttons because the normal tooltips are too small
but that is just it. i have to add the custom tooltip to the widget parts / components on the widget (like buttons) via blueprint now too
so i saw the set tool tip (tatget = widget) and its description says: sets a custom widget as the tooltip of the widget
but if i simply use set tool tip in conjunction with set tool tip text it clearly is not enough

on the side, what do you call a standalone grand widget
because it is a widget
and everything inside the widget is a widget

now i realize i need to add custom tooltips to the buttons because the normal tooltips are too small

Indeed. Try it as above, create the widget inside the bound function:

Expose some variables (like in the thread with the dispatchers). If you use this bind, the tooltip will be created and destroyed automatically.


Dunno. There’s no official word for it. Master widget?

1 Like

ok

it kind of works

at least i am getting somewhere

do you mean to say set tool tip (target = widget) node does not work? or not for this?

main thing now is to get the position right

what i have done based on what i got from you
is to create and bind an event on the button hovered
i use that event to create a widget, add it to viewport, set its location and set its text

thats great

but my position is off at this point

No need for these two. The function will add it to the viewport and set its location. And setting text is best done via exposed vars. This way you should get an early pre-pass during construction so the text does not visually wiggle in its container.


If the tooltip auto-positioning is not what you want, you will need to create your own tracking system. Maybe the tooltip needs to follow the mouse cursor, maybe it needs to appear in a specific place. Afair, the suggested method accounts for screen edges.

Alternatively, there is also:

It’s usually used for context menus but you can make tooltips with it, too - it has some interesting Placement properties:


It works. Can’t confirm / deny the “not for this” part as I don’t know what this is. I can imagine half a dozen way of making tooltips. The crux is in the details.

1 Like

can you perhaps explain why you expect the widget to get its position itself and be added to the viewport itself

in my view, i am using a button hovered event to pop a widget for a tooltip
i guess the widget may see the button as its parent and use its location

if i dont add it to the viewport or set the position i cant see the text (when i do the said i can)
i can see it is there as it messes up the parent widget yet does not display
i have set its size so that it is not too big
and keep in mind that i already have multiple widget visible in the viewport at the time of the tooltip widget being added

lol

ok i have added set tool tip node now

and removed add to viewport and set position in viewport

i really took it that set tool tip node will pretty much do everything for you

it works appropriately but it crashes the parent widget for some reason

the parent widget border / background gets distorted

  • I have 2 widgets:

  • the tooltip:

  • MyWidget creates myTooltip:

  • with a bound function:

  • which results in:

That single node is all the script there is.

1 Like

yes i needed the set tool tip node to finish up after the hovered bound

but it wrecks my parent slightly

But this is not what is suggested above at all. No hovered states are used.

1 Like

lol

you suggested / mentioned binding the tooltip widget to the button tooltip widget

you are working in the editor / designer

i created the button in blueprint so i cant just jump to the designer to bind A to B

knew i had to bind something to something

and bind to button hovered seemed best fit

Isn’t this the original issue you’re having (now on top of crashing…)? The solution is above, it’s a single node, take it or leave it. There is no need to do anything manually unless you want a specific behaviour. If you do it all manually, you must handle it all yourself.

Good luck!

1 Like

lol

parent widget crash is because i set the tooltip widget size and did not specify it is tooltip widget so editor / compiler took it to be parent widget

so it displays nicely

i guess i got tangled up in having to bind the widget or function to the button tooltip widget as you would do in the designer
will now see if can remove the the button hovered binding

and i think i now see what set tool tip node does and does not do

thanks

i see i must run / execute <set tool tip (target = widget)> the moment the button widget is hovered otherwise it is not working
and binding to event button hovered helps with this
hence i am struggling to make this work in blueprint when i dont use the button hovered event binding

i also take it that it is set tool tip (target = widget) that sets the widget as visible, in viewport, and gives its location relative to the button. can you perhaps confirm or refute this

i also take it that it is set tool tip (target = widget) that sets the widget as visible, in viewport, and gives its location relative to the button. can you perhaps confirm or refute this

I hereby confirm it, that works too. It does not give it a location relative to the button, ofc. It just follows the cursor, as tooltips do.


i see i must run / execute <set tool tip (target = widget)> the moment the button widget is hovered otherwise it is not working

Curious to see what must you do for this not to work since it’s a single node :person_shrugging:

you have A:

and you have B:

i follow A
i dont have B

i have

i cant B just as is as there are no buttons in my designer editor only in blueprint

to get somewhere to B i do

but this (set tool tip) does not work on its own unless i

i am really trying my best to stick to what you are saying
maybe i am just struggling to connect the dots

the tooltip widget is working perfectly now, but the above is how i get it to work and i cant remove any part otherwise it no longer works

The main problem here is solved in one of the previous threads. Rather than using user widgets, you manually make native buttons and text which I would only describe as unmaintainable utter madness:

If you had a user widget, you could have it pop a tooltip just like that… whether it’s spawned dynamically or not.


Do seriously consider re-factoring the appraoch. None of the stuff you’re doing above is necessary if all you want to do is populate a container with widgets and have them show tooltips…

In its current state, I would not know how to advise. Gonna tap out.

1 Like

yes i suppose that is another way to do it and get it (binding) done in the designer as opposed to the graph

what would you use set tool tip (target = widget) for
at this point i am a bit perplexed by the node
i am using it and it works but not sure what it is really for and when you would use it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.