How to get text size or resize the widget according to the text size?

3k Views Asked by At

I am creating widgets in runtime and then change texts in them by using setText. The problem is the Size Box which contains the text doesn't update as "Size to Content" after i changed the text. is it possible to update this so it can resize according to the text?

I tried to get string size with getTextSize blueprint node, but it only works at drawHud event and hard to use outside of HUD blueprint (which i believe is almost obsolute after UMG?)

Any solution in blueprint or C++ is appreciated.

0

There are 0 best solutions below