PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

TextLabel

Show deprecated

TextLabel

Show deprecated

A TextLabel renders a rectangle, like a Frame, with styled text. The rectangle can be used to define text boundaries, text scaling (TextLabel/TextScaled) and wrapping (TextLabel/TextWrapped, TextLabel/TextXAlignment, TextLabel/TextYAlignment).

This class contains properties that control the display of the text, such as TextLabel/Font and TextLabel/TextColor3. All text rendered by a single text label will have the same visual properties; multiple TextLabel objects must be used in order to render multiple styles of text. To display only text and hide the rectangle, set GuiObject/BackgroundTransparency to 1.

TextService/GetTextSize can be used to get the size (bounds) of text that would be rendered in a TextLabel given a font size, font, and frame size.

A UITextSizeConstraint object can be used to constrain the size of text with TextLabel/TextScaled enabled.

Properties

Font

Font

Determines the font used to render text.

float

LineHeight

Scales the spacing between lines of text in the TextLabel.

string

LocalizedText

[Hidden] [ReadOnly] [NotReplicated]

Sets whether a TextLabel should be GuiBase2d/Localize or not.

string

Text

Determines the string rendered by the UI element.

Vector2

TextBounds

[ReadOnly] [NotReplicated]

The pixel size of a UI element’s text.

Color3

TextColor3

This property determines the color of rendered text

bool

TextFits

[ReadOnly] [NotReplicated]

Enables when rendered text content does not fit within the UI element’s space.

bool

TextScaled

Determines whether text in a UI element is scaled to fill the UI element.

float

TextSize

Determine the line height of text in pixels.

Color3

TextStrokeColor3

Determines the color of the text stroke (outline).

float

TextStrokeTransparency

Determines the transparency of the text stroke (outline).

float

TextTransparency

Determines the transparency of rendered text.

TextTruncate

TextTruncate

Controls the truncation of the text displayed in this TextLabel.

bool

TextWrapped

Determines if text wraps to multiple lines within the TextLabel|GUI element space, truncating excess text.

TextXAlignment

TextXAlignment

Determines the horizontal alignment of rendered text.

TextYAlignment

TextYAlignment

Determines the vertical alignment of rendered text.

Functions

Events