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

TextButton

Show deprecated

TextButton

Show deprecated

A TextButton behaves similarly to TextLabel in regards to rendering with the additional behaviors of a GuiButton. It defines the same text-rendering properties as a TextLabel does.

You can disable text rendering by setting TextButton/TextTransparency to 1. This will leave you with a plain rectangle that can be used as a button.

Properties

Font

Font

Determines the font used to render text.

float

LineHeight

Scales the spacing between lines of text in the TextButton.

string

LocalizedText

[Hidden] [ReadOnly] [NotReplicated]

Sets whether a TextButton 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

Determines the color of rendered text

bool

TextFits

[ReadOnly] [NotReplicated]

A boolean representation of whether the TextButton’s text fits within the size of it.

bool

TextScaled

Changes whether text is resized to fit within the TextButton.

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 TextButton.

bool

TextWrapped

Determines if text wraps to multiple lines within the TextButton|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

void

SetTextFromInput ( string text )

Sets the TextButton’s TextButton/Text to text, and raises the TextButton’s GuiObject/InputChanged event with a UserInputType of TextInput.

Events