TabPositions Property (ATextBox)

Returns or sets a specific item tab stop position in pixels in the ATextBox object.

Syntax

Object.TabPositions ( IIndex ) [ = nTabPositions ]

The TabPositions property syntax has the following parts:

 

Name

Type

Description

Object

ATextBox

ATextBox control

lIndex

Val Long

An integer specifying the zero-based location in the array of tab positions, up to the value of the TabPositionsCount property.

nTabPositions

Short

A tab position (in pixels).

Comments

The property has an effect only when MultiLine is set to True and the Text property has tab characters (''\t'). When text is copied to a multiple-line edit control, any tab character in the text causes space to be generated up to the next tab stop.

If the TabPositions array contains one item, then each column is separated by the specified distance in TabPositions(0). If the property contains more than one tabs stops, then these are translated to tab positions.

Valid values are 0 to 2048.

Sets the TabPositionsCount to specify the number of tabs used prior to setting the TabPositions items.

The default value is an empty list and tabs have an equal and a  predefined system width.

Example

The following statement sets the text box with three columns the second at 100 pixels from the left and the third at 140 pixels from the left:

tbTestsResults.TabPositionsCount=2

tbTestsResults.TabPositions(0)=100

tbTestsResults.TabPositions(1)=140

 

Applies to

ATextBox

See Also

MultiLine, TabPositionsCount