ComboBox.InsertItem

number ComboBox.InsertItem ( 

string ObjectName,

number Index,

string Text,

string Data = "" )

Description

Inserts a new item into a combobox object at a specific index. (Note: The item's inserted position will persist even if sorting is enabled.)

Parameters

ObjectName

(string) The name of the combobox object.

Index

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

Text

(string) The item text to display.

Data

(string) The optional item data to associate with the item text. (The default is an empty string "".)

Returns

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

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions