# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
set the textAlign [of line] of {button | field} to {left | center | right}
# Examples
set the textAlign of field "myField" to center
set the textAlign of line 1 of field "myField" to right
# Description
Use the textAlign property to change the alignment of individual lines of text in a field, the whole field or buttons.
By default, the textAlign of newly created fields and buttons is "left".
# Tags
ui,
# See
- **keyword:** field, button - **property:** borderWidth, vgrid, acceleratorText, dontWrap, formattedText, spaceAbove, backgroundColor, margins, listBehavior, hidden, textSize, firstIndent, tabstops, spaceBelow, listStyle, rightIndent, listDepth, hgrid, printTextAlign, hScrollbar, borderColor, formattedWidth - **object:** button - **glossary:** property