ComboBox.InsertItem

number ComboBox.InsertItem ( 

string ObjectName,

number Index,

string Text,

string Data = "" )

Example 1

-- Add two new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");

-- Insert a new item into the combobox at index 2.
ComboBox.InsertItem("ComboBox1", 2, "New Item", "New Data");

-- Check to see if any errors occurred calling the ComboBox.InsertItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
   Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Adds two items to the combobox object "ComboBox1", then inserts a third item at index 2.

See also:  Related Actions