UI text font width

I didn’t really check if there are other posts about this topic, since I just don’t know how look for it. For context, I’m making a plugin:
One of the functions of it will be to create single buttons that will include a button icon and a text by user choice. The text label should be sized according to the text width, plus X pixels so it appears to be placed in the middle of the label:
However, if I turn on AutomaticSize, it only sets the label’s width to the minimum required to the text to fit in:

Could I make it so the script calculates out the size needed for the text to fit, and then add an X value to that result? I know that the size set by AutomaticSize is not displayed in the Size property.
Thanks for any help

Add a UIPadding to the frame and change the RightPadding property.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.