Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Label

Classes

Class: Label

Extends Widget

Label

A Label widget displays a string with configurable style, insets, auto-resizing, and optional number-only formatting.

Dependencies:

Field: style

TextStyle

The text style applied to the label’s text.

Method: SetNumberOnly

(method) Label:SetNumberOnly(only: boolean)

Enables or disables number formatting for the Label’s text. Must be set before Label:SetText.

@param onlytrue to format text as if it were numbers only, false to allow any text. (default: false)

Method: SetInset

(method) Label:SetInset(left: number, top: number, right: number, bottom: number)

Sets the inset for the Label.

@param left — The left inset.

@param top — The top inset.

@param right — The right inset.

@param bottom — The bottom inset.

Method: SetAutoResize

(method) Label:SetAutoResize(resize: boolean)

Enables or disables automatic resizing of the Label.

@param resizetrue to enable auto resizing, false to disable. (default: false)

Method: GetInset

(method) Label:GetInset()
  -> left: number
  2. top: number
  3. right: number
  4. bottom: number

Retrieves the inset of the Label.

@return left — The left inset. (default: 0)

@return top — The top inset. (default: 0)

@return right — The right inset. (default: 0)

@return bottom — The bottom inset. (default: 0)