wcAddItem() Function
- Last UpdatedNov 23, 2018
- 1 minute read
Adds an item to the end of the list of a list box or combo box. If sorting is enabled, the list is sorted after the item is added.
Category
windows control
Syntax
[ErrorNumber=]wcAddItem("ControlName", "MessageTag");
Parameters
ControlName
The name of the windows control object. For example, ListBox_1. Actual string or message tagname.
MessageTag
The message string to be shown. Actual string or message tagname.
Remarks
For a list of returned error numbers, see Understand windows controls error messages.
Applies To
List boxes and combo boxes.
Example(s)
The following statement adds the contents of the message string to the list box when the window (using On Show Window QuickScript) containing the list box is opened:
wcAddItem("ListBox_1", "Chocolate");
wcAddItem("ListBox_1", "Vanilla");
wcAddItem("ListBox_1", "Strawberry");
See Also
wcInsertItem()