wcInsertItem() Function
- Last UpdatedNov 23, 2018
- 1 minute read
Inserts the specified string into the list of a list box or combo box at the specified position. Unlike the wcAddItem() function, the wcInsertItem() function does not sort a list, even if it is created as a sorted list box or combo box.
Category
windows control
Syntax
[ErrorNumber=]wcInsertItem("ControlName", ItemPosition, "Message");
Parameters
ControlName
The name of the windows control object. For example, ListBox_1. Actual string or message tagname.
ItemPosition
A number corresponding to the position of the item to be added. If this parameter is -1, the string is added to the end of the list. Any number or Integer tagname.
Message
Contains the string to insert at the position indicated by ItemPosition. 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 inserts a new item called "Blueberry" into a list box at fourth position from the top when an action script runs.
wcInsertItem("ListBox_1", 4, "Blueberry");
See Also
wcAddItem()