TextXAlignment (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
used enum template; added example
>Camoy
No edit summary
Line 3: Line 3:
|property = [[Enum]] ''TextXAlignment''
|property = [[Enum]] ''TextXAlignment''
|description = Sets where the text is placed in a GUI on the X axis.
|description = Sets where the text is placed in a GUI on the X axis.
|object = [[TextButton]], [[TextBox]], [[TextLabel]]
|object = [[TextBox]], [[TextButton]], [[TextLabel]]
}}</onlyinclude>
}}</onlyinclude>



Revision as of 13:53, 22 January 2011

TextXAlignment
Property Enum TextXAlignment
Description Sets where the text is placed in a GUI on the X axis.
Member of [[RBX.lua.TextBox, TextButton, TextLabel (Object)|TextBox, TextButton, TextLabel]]
The TextXAlignment Enum controls TextX alignment. It holds 3 values.
Enum Name Description
0 Left The text is set aligned to the left.
1 Right The text is set aligned to the right.
2 Center The text is set aligned to the center.


Example
The resulting label's text will be centered.
Instance.new('TextLabel', script.Parent).TextXAlignment = Enum.TextXAlignment.Center