How do I Limit the number of rows in a UMG Text Widget?

The link does not work.

It can be done, you’d need to prepare the lines of text upfront or code a method that grabs just enough text (char count may work fine) from a string and chops it. And then:

  • create a widget that represents a line of text
  • keep adding those widgets to a Scroll Box
  • scroll to the bottom after adding each line

Have a look at my post here; there’s a vid attached to demo what it does. Hope that’s it.


Alternatively, although untested, accumulating text in a single Text Block sitting at the bottom of a Scroll Box and relying on the automatic line-breakes could also work OK - worth trying. You may need to force a layout prepass to avoid text rejiggling as its desired size changes.

1 Like