AddItem
Description
Adds a new item to the list of choices created by a CHOICE_LIST hook.
The
pre-existing HookChoices object is stored in a variable called choices
that
is visible only within a CHOICE_LIST hook. In the syntax section of this method, choices
is
a variable name that must be typed literally (for hooks, not global
scripts)
; it is not a placeholder for an arbitrary name or expression.
This is the only way to access a HookChoices object.
A
CHOICE_LIST hook should call this method repeatedly to build up a list of
choices for the user (or, you can use the AddItems
method).
The object contains no items when you first access it. Add items in the order
in which you want them to appear, because the list is not automatically sorted.
There is no corresponding RemoveItem method. Duplicate items are not automatically removed, but empty values are.
Syntax
VBScript
choices.AddItem
(newChoice)
- Identifier
- Description
- choices
- A special HookChoices object.
- newChoice
- A String containing the new text to be added to the list of choices displayed to the user.
- Return value
- None.