Download

SetText(FText::AsNumber(myCounter)); <---using FNumberFormatOptions?

Hi! I would like to know how is the method to use FNumberFormatOptions
when setting an FText. Any help? :slight_smile:

Right now I just want to show min/max 3 integral digits and no decimals.
Thanks!

Easy: You create a FNumberFormatOptions variable, set the parameters how you want, and then pass it along to the function. Like so:

FNumberFormattingOptions Options;
Options.MaximumFractionalDigits = 0;
Options.MinimumIntegralDigits = 3;
Options.MaximumIntegralDigits = 3;
FText Foo = FText::AsNumber(Bar, &Options);

Thanks!!! I was near but missing the & :frowning: