# UMG:  Scaled dynamic text in Grid/Horizontal/Vertical boxes "jumps" for 1 frame

**URL:** <https://forums.unrealengine.com/t/umg-scaled-dynamic-text-in-grid-horizontal-vertical-boxes-jumps-for-1-frame/487743>\
**Category:** UI\
**Tags:** frames, text, unreal-engine, question, UMG\
**Created:** [August 20, 2021, 4:08pm UTC](https://forums.unrealengine.com/t/umg-scaled-dynamic-text-in-grid-horizontal-vertical-boxes-jumps-for-1-frame/487743 "2021-08-20T16:08:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gravaton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gravaton](https://forums.unrealengine.com/u/gravaton)\
**Post date:** [August 20, 2021, 4:08pm UTC](https://forums.unrealengine.com/t/umg-scaled-dynamic-text-in-grid-horizontal-vertical-boxes-jumps-for-1-frame/487743/1 "2021-08-20T16:08:11Z")

</div>

I’m having a problem with UMG text widgets that’s been driving me a little bit batty. Basically, text widgets involved in scaled display while being within layout components exhibit a small shift in position the frame after they’re first displayed.

Let me give a more specific rundown of the situation that causes this issue:

- The text widget is inside a layout component (i.e. a Grid, Horizontal or Vertical container)
- The text widget itself OR the layout component as a whole is enclosed by a ScaleBox
- The text within the text widget has to be large enough to require the ScaleBox to scale either the text or the enclosing element
- Said text has been changed or updated at the construction of the enclosing widget

The issue manifests as what looks to be a single-frame layout error, the position of the text shifts very slightly from the first frame of display to the second. I have tried spawning the widget and then waiting with a delay. I have tried putting “Force Layout Prepass” nodes literally everywhere throughout my blueprints to no avail. The closest thing I’ve come to a clue is this question which, deep down in the answers, mentions a potential bug in how ScaleBoxes handle the arrangement of their children ( [UMG: Visual artifacts when using auto wrap text - UI - Epic Developer Community Forums](https://answers.unrealengine.com/questions/208580/umg-visual-artifacts-when-using-auto-wrap-text.html) ) but I don’t have enough familiarity with the engine innards to know if this is on the right track or not.

I have found that in SOME cases I can stop this shifting issue if I set the Scale Box (specifically surrounding the Text widget in this case) slot’s properties to Fill/Fill, instead of Center/Center for horizontal/vert alignment. This results in a layout that is NOT what I want, but it does stop the text from shifting even when being scaled.

I’ve attached a sample project that exhibits the issue - You can just run the project. The button spawned in the upper left will repeatedly spawn and then despawn a UI component that exhibits the issue. If there’s ANY tips ANYONE can give me on eliminating this problem I’d very much appreciate it.

Sample project with issue
