TabPositions Property (AListBox)

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

Syntax

Object.TabPositions ( IIndex ) [ = nTabPositions ]

The TabPositions property syntax has the following parts:

 

Name

Type

Description

Object

AListBox

AListBox control

lIndex

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

Items strings that contains the tab characters (\t) are by default not aligned to the next tab position. If the TabPositions array contains one item, then each column is separated by the specified distance (TabPositions(0)). If the array contains more than one Tabs Stops, then these are translated to tab positions.

Valid values are 0 to 2048. The property is supported only when MultiLine is set to True.

The default value is NULL, meaning it is an empty list and tabs are not expanded. If lIndex is not valid number (see TabPositionsCount) or if the array item is not initialized, the return value is 0.

Example

The following statements set the AListBox Tab count to be 2 and List array's 1st and 2nd items to have tab positions at 400 and 800 pixels respectively from the starting point of that list item:

lb1.TabPositionsCount=2
lb1.TabPositions(0)=400
lb1.TabPositions(1)=800
for i=1 to app.ProgramsCount

prog=app.Programs(i-1)

lb1.AddItem(Prog.Name+"\t"+Prog.Tag+"\t"+str(i))

next

Applies to

AListBox

See Also

List, TabPositionsCount