AutoPlay Media Studio 9

ComboBox.InsertItem

ComboBox.InsertItem

This is the first topic This is the last topic  

ComboBox.InsertItem

This is the first topic This is the last topic  

OverviewExamples

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


Learn More: Indigo Rose Software - AutoPlay Media Studio - Buy Now - Contact Us