Name: tabStops

Type: property

Syntax: set the tabStops [of line <lineNumber>] of <field> to <tabStopList>

Summary:
Specifies the location of <tab stop|tab stops> in a <field>.

Associations: field

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
set the tabStops of field "Comments" to 20

Example:
set the tabStops of field 1 to 40,80,120,160,200

Example:
if the tabStops of me is empty then answer "Sorry - can't tab."

Example:
set the tabStops of line 2 to -2 of field "list" to 50

Value:
The <tabStops> of a <field(object)> is a list of one or more positive
<integer|integers>, separated by commas. By default, the <tabStops>
<property> of newly created <field(object)|fields> is set to empty.

Description:
Use the <tabStops> <property> to let users tab to a horizontal location
within a <field(object)>.

If the user presses the &lt;Tab&gt; key while editing a field,
normally the insertion point moves to the next control whose
traversalOn <property> is true. If the <tabStops> <property> is not
empty, the user can enter tab characters in the <field(object)>. Each
time the Tab key is pressed, the <insertion point> moves to the next
<tab stop> on the current line.

The <tabStops> consists of one or more <integer(glossary)|integers>
separated by commas. Each <integer(keyword)> is the distance in
<pixels> from the left margin of the <field(object)> to a <tab stop>,
after taking into account the <leftIndent> and <firstIndent>
properties.  For example, if the <leftIndent> is 20 pixels, the
<firstIndent> is 25 pixels, and the first item of the <tabStops> is 30
pixels, the first tabstop will be 75 pixels from the left margin of
the field.

If a tab stop is less than the previous tab stop, the distance is
measured relative to the previous tab stop. For example, if the
<tabStops> is set to "20,100,30", tab stops are placed at 20, 100, and
130 <pixels> from the left margin.

>*Tip:*  If you set the <field's (object)> <vGrid> <property> to true, a
> vertical line is drawn at each <tab stop>. Temporarily setting this
> <property> to true can help you get a better idea of where each <tab
> stop> is.

If the <tabStops> does not define tabs for the entire width of the
<field(object)>, or if the <field(object)|field's> <dontWrap>
<property> is true, LiveCode creates implicit <tab stop|tab stops>
across the entire <field(object)>. (For example, if a
<field(object)|field's> <tabStops> is 10, the <field(object)> has a
<tab stop> every 10 <pixels>.) If the <tabStops> <property> defines more
than one <tab stop>, the width of the last tab column repeats for the
width of the <field(object)>. (For example, if a
<field(object)|field's> <tabStops> is 20,100,130, the width of the last
tab column is 30, so additional <tab stop|tab stops> are automatically
created at 160, 190, 220, and so on.)

If the <tabStops> is empty, the <field(object)> has no <tab stop|tab
stops>, and pressing the Tab key moves the <insertion point> to the next
<field(object)>.

>*Important:*  Setting the <field's (object)> <textAlign> to center or
> right may cause unexpected results when using <tab stop|tab stops>.

>*Note:*  If the <tabGroupBehavior> property of a group containing the
> field is set to true, you cannot press the Tab key to go to the next
> tab stop. (The <tabStops> setting still controls the spacing of any
> tab <characters> that are pasted into the <field(object)> or placed
> in it by a <handler>.)

References: property (glossary), insertion point (glossary),
tab stop (glossary), integer (glossary), handler (glossary),
field (keyword), integer (keyword), characters (keyword),
tabKey (message), field (object), leftIndent (property),
borderWidth (property), autoTab (property), vgrid (property),
textAlign (property), dontWrap (property), tabGroupBehavior (property),
formattedText (property), spaceAbove (property),
backgroundColor (property), listBehavior (property),
listIndent (property), hidden (property), textSize (property),
width (property), firstIndent (property), spaceBelow (property),
listStyle (property), rightIndent (property), listDepth (property),
hgrid (property), pixels (property), hScrollbar (property),
borderColor (property), formattedWidth (property)

Tags: ui

