AutoPlay Media Studio 9

ComboBox.GetItemText

ComboBox.GetItemText

This is the first topic This is the last topic  

ComboBox.GetItemText

This is the first topic This is the last topic  

 OverviewExamples

string ComboBox.GetItemText (

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

 

-- Get the item text of the second item in the combobox object.

item_text = ComboBox.GetItemText("ComboBox1", 2);

 

-- If the item is valid display a dialog message. Otherwise display a notification.

if (item_text ~= "") then

  Dialog.Message("Item Text", "The item text is '"..item_text.."'.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

else

  Dialog.Message("Item Text", "The item does not contain any item text.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

end

Adds two items to the combobox object "ComboBox1", retrieves the text from the second item, and displays it to the user.

See also: Related Actions


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