ListBox.InsertItem

number ListBox.InsertItem ( 

string ObjectName,

number Index,

string Text,

string Data = "" )

Description

Inserts a new item into a listbox object at a specific index.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) to insert the new item. You can use an index of -1 to insert an item at the end of the list.

Text

(string) The item text to display for the new item.

Data

(string) The optional item data to associate with the new item.

Returns

(number) The index where the item was added. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions