# Constrain UMG widget inside player screen

**URL:** <https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/59622>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [March 29, 2016, 2:07pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/59622 "2016-03-29T14:07:05Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [August 26, 2021, 1:02pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/59622/9 "2021-08-26T13:02:58Z")

</div>

> [Constrain UMG widget inside player screen](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/59622)

There are many ways:

> [@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)

There’s also automatic tooltips that do this automagically. There’s also menu anchor widget that can pop something - afair, it respects screens boundary, I migth be wrong about the last one, though.

* * *

> [@Vyks](#):
>
> I’m looking to know as well

These are just for to preview the widget in the Designer. It gives you a reasonable idea of it will behave, so it’s easier to work with. Think of those modes as simulation.

This widget does not have a parent atm, but if you’re planning on placing it in a container like a 64x64 Size Box or Canvas that will enforce the Desired Size, you could set Custom On Screen to 64x64 as well. Now the widget will behave as if it was sitting in a restrictive parent even though it’s yet to be added there.

---

_[View the full topic](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/59622)._
