AutoPlay Media Studio 9

ComboBox.SetSelected

ComboBox.SetSelected

This is the first topic This is the last topic  

ComboBox.SetSelected

This is the first topic This is the last topic  

OverviewExamples

ComboBox.SetSelected (

string ObjectName,

number Index )

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");

 

-- Set the combobox selection to the item at index 2.

ComboBox.SetSelected("ComboBox1", 2);

 

-- Check to see if any errors occurred calling the ComboBox.SetSelected 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 "ComboBox1" and selects the second one.

See also: Related Actions


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