AutoTextSize||doc136498

September 20, 2022

Format

Button.AutoTextSize

Describe

This attribute limits the size of the text within the button. RegardlessButton.FontSizeThe size of the actual rendered text will not exceed the size of the window. Similarly, no matter how small the window size is, it will not be smaller thanButton.MinAutoTextSizeSize of.

Code Example

image.png

-- create layout window
local APIRootWindow = UI:CreateGUIWindow("API")

--Set the window to the root node of the UI
APIRootWindow.Parent = UI.Root

--Get the Button control for testing according to the name
local button = APIRootWindow.APIButton

--Set the button control adaptive text size
button.AutoTextSize = true