DlgComboBox.AddItem

number DlgComboBox.AddItem ( 

number ControlID,

string ItemText )

Description

Adds an item to a combo box control. If the combo box is sorted, the item will be added in sorted order, otherwise it will be added to the end.

Note: This action will only work if called from a screen's events and if the named control is on the current screen.

Parameters

ControlID

(number) The numeric ID of the combo box control that you want to add an item to.

ItemText

(string) The text of the item you want to add.

Returns

(number) The index (line number) where the item was added. If an error occurs, -1 is returned. If the current screen does not contain the control, this action will fail. If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions