TextXAlignment (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Pauljkl
No edit summary
>Camoy
used enum template; added example
Line 1: Line 1:
{{Property|
<onlyinclude>{{Property
name = TextXAlignment
|name = TextXAlignment
|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 = [[RBX.lua.TextButton (Object)|TextButton]], [[RBX.lua.TextBox (Object)|TextBox]], [[RBX.lua.TextLabel (Object)|TextLabel]]
|object = [[TextButton]], [[TextBox]], [[TextLabel]]
|}}
}}</onlyinclude>


{{clear floats}}


{{Enum|The TextXAlignment [[Enum]] controls TextX alignment.  It holds 3 values.|
{{Enum/row|0|Left|The text is set aligned to the left.}}
{{Enum/row|1|Right|The text is set aligned to the right.}}
{{Enum/row|2|Center|The text is set aligned to the center.}}
}}


{| class="wikitable" width=100% border="1" cellspacing="0" cellpadding="4" style="background-color: #fdd; border: 1px solid #f00;"
<br />
|-
 
| bgcolor="#AB5454"|<span style="color:white">'''Enum'''</span>
{{Example|The resulting label's text will be centered.<pre>
| bgcolor="#AB5454"|<span style="color:white">'''Name'''</span>
Instance.new('TextLabel', script.Parent).TextXAlignment = Enum.TextXAlignment.Center
| bgcolor="#AB5454"|<span style="color:white">'''Description'''</span>
</pre>}}
|-
 
|+ <big>The TextXAlignment [[Enum]] set only has three numbers.</big>
[[Category:Properties]]
|0
|Left
|The text is set on the left
|-
|1
|Right
|The text is set on the right
|-
|2
|Center
|The text is set in the centre
|}

Revision as of 13:51, 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.TextButton, TextBox, TextLabel (Object)|TextButton, TextBox, 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