Specifies the location of tab stops in a field.


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


set the tabStops of field "Comments" to 20
set the tabStops of field 1 to 40,80,120,160,200
if the tabStops of me is empty then answer "Sorry - can't tab."
set the tabStops of line 2 to -2 of field "list" to 50

Use the tabStops property to let users tab to a horizontal location within a field.

If the user presses the Tab key while editing a field, normally the insertion point moves to the next control whose traversalOn property is true. If the tabStops property is true, the user can enter tab characters in the field. 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 integers separated by commas. Each integer is the distance in pixels from the left margin of the field to a tab stop. 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.

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, or if the field's dontWrap property is true, LiveCode creates implicit tab stops across the entire field. (For example, if a field's tabStops is 10, the field 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. (For example, if a field's tabStops is "20,100,130", the width of the last tab column is 30, so additional tab stops are automatically created at 160, 190, 220, and so on.)

If the tabStops is empty, the field has no tab stops, and pressing the Tab key moves the insertion point to the next field.

Setting the field's textAlign to center or right may cause unexpected results when using tab stops.

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 or placed in it by a handler.)

See also: 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),

Community content is available under CC-BY-SA unless otherwise noted.