# Tooltip out of screen

**URL:** <https://forums.unrealengine.com/t/tooltip-out-of-screen/756657>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [January 25, 2023, 1:43pm UTC](https://forums.unrealengine.com/t/tooltip-out-of-screen/756657 "2023-01-25T13:43:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iscreamdeye](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Iscreamdeye](https://forums.unrealengine.com/u/Iscreamdeye)\
**Post date:** [January 25, 2023, 1:43pm UTC](https://forums.unrealengine.com/t/tooltip-out-of-screen/756657/1 "2023-01-25T13:43:44Z")

</div>

![tooltip](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/1/ee146213080fa96cd9a3b217d88a785a43b33b33.png)

Is there a simple solution for tooltip detect that if it is out of screen it adjust its self to screen border so it does not go over it?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 25, 2023, 2:23pm UTC](https://forums.unrealengine.com/t/tooltip-out-of-screen/756657/2 "2023-01-25T14:23:26Z")

</div>

The native tooltip system already does that:

A better question here is what are you doing to override it? How do you make & update them?

* * *

If you wanted to make it all custom (because you like challenges), you can calculate it. You know the viewport size and you know the dimension of the widget.

---

<div class="post-metadata">

**Author:** ![Iscreamdeye](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Iscreamdeye](https://forums.unrealengine.com/u/Iscreamdeye)\
**Post date:** [January 30, 2023, 9:09am UTC](https://forums.unrealengine.com/t/tooltip-out-of-screen/756657/3 "2023-01-30T09:09:12Z")

</div>

![tooltip2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/3/2b38dd4053d015a56d23d9ec55e4cd95a4b33e5b.jpeg)

This is my setup. Can u show me ur setup?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 30, 2023, 9:32am UTC](https://forums.unrealengine.com/t/tooltip-out-of-screen/756657/4 "2023-01-30T09:32:41Z")

</div>

> [@Iscreamdeye](#):
>
> Can u show me ur setup?

It’s not really _my setup_. It’s _the standard_ way the engine handles tooltips:

> [@Is it possible to add a tooltip to a user widget object?](https://forums.unrealengine.com/t/is-it-possible-to-add-a-tooltip-to-a-user-widget-object/743327/2):
>
> Select any Visible native element inside the User Widget and: [image] This allows you to construct and automatically destroy a User Widget tooltip. If you Expose on Spawn variables, you’ll be able to pipe in data which the tooltip widget can use during Construct. You can, ofc, just use the Tool Tip Text instead (top of the pic) but having control over how tooltips look like & behave is pretty handy.

* * *

In your example you’re doing it all manually (which may be fine in case you need something the engine does not offer by default). You’d need to modify the Set Position data by clamping it, example:

> [@UMG Widget: Stay on screen - But how?](https://forums.unrealengine.com/t/umg-widget-stay-on-screen-but-how/123044/5):
>
> while there’s half a dozen ways to implement this, the gist is to subtract half the widget size from the viewport size and use it as a clamp: vid: [https://i.gyazo.com/7e60baa21a0fbe5e5796d81524b27671.mp4](https://i.gyazo.com/7e60baa21a0fbe5e5796d81524b27671.mp4)

Ignore the de-projection, use the Mouse Postion instead. But if you’re using mouse values to position it all, the 1st method already does that… So maybe it’s better here. Not sure what other plans you have to the tooltips - hard to advise.

* * *

Another way to display tooltips that gives one quite a bit control & flexibility is the Menu Anchor. Nifty little thing.

---

<div class="post-metadata">

**Author:** ![Iscreamdeye](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Iscreamdeye](https://forums.unrealengine.com/u/Iscreamdeye)\
**Post date:** [January 30, 2023, 9:46am UTC](https://forums.unrealengine.com/t/tooltip-out-of-screen/756657/5 "2023-01-30T09:46:51Z")

</div>

Thank you for solution. I was watching Ryan Laley inv system tutorial. And i thought if he is doing this than it must be the right way.

After seeing ur posts i searched for my older project and tooltip was created with binding like in ur example.

Thank you. And have a grate day.
