OverviewExamples
-- Adds a new item with item text "Item One" and no associated data to the
-- combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item One", "");
-- Check to see if any errors occurred calling the ComboBox.AddItem 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 a new item with item text "Item Two" and associated data "C:\\Two.txt"
-- to the combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");
-- Check to see if any errors occurred calling the ComboBox.AddItem 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 a ComboBox object "ComboBox1" and checks for errors.
See also: Related Actions