List Property (AListBox)

Returns or sets the text of a specific item in the list of items of the object.

Syntax

Object.List ( IIndex ) [ = sItemText ]

The List property syntax has the following parts:

 

Name

Type

Description

Object

AListBox

AListBox control

lIndex

Long

A number specifying the zero-based location of the currently selected item in the array of items in the object.

sItemText

BString

The text of the item at lIndex.

Comments

The default value of the List item is NULL (an empty list).

Example

The following statement changes the AListBox List array's 8th item to be the text string 'Blue':

lb1.List(7)='Blue'

The following shows the test results being stored in the AListBox array and retrieved :

if lb1.ListIndex<>-1

TestResult=lb1.List(lb1.ListIndex)

else

TestResult=-1

endif

Applies to

AListBox

See Also

ItemData, ListCount, ListIndex