itemText

Type: String array

Availability: Read or write at run time only

The itemText property enables you to access the text of an item in a ListBox or ComboBox control.

The item of the list box or the combo box control must have been added by using the addItem or addItemAt method, or by associating a collection with a list box or a combo box. The index of the first item is 1 and the index of the last item is listCount method.

Initially, list boxes and combo boxes contain an empty list. Changing the text of an item in a sorted list box or combo box causes the item to be sorted into its correct sorted position. Its new (or unchanged) position can be obtained by using the newIndex method.

The text property returns the same as the itemText property for the currently selected item.

The code fragment in the following example shows the use of the itemText property.

if listFaults.itemText[listFaults.listIndex] <> "" then
    bCloseFault.enabled := true;
endif;