TextWidth||doc136479

September 20, 2022

Format

Text.TextWidth

Describe

The overall width of the text content in pixels. It is very useful for developers to customize the adaptive size of the text control size.

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 Text control for testing according to the name
local text = APIRootWindow.APIText

--Set the text width of the text control
text.TextWidth = 20