Adds an item to the object.
[ lAddItem = ] Object.AddItem ( sItem )
The AddItem method syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
AListBox |
AListBox control |
|
sItem |
Val BString |
The text string being added. |
|
lAddItem |
Long |
The return value is the zero-based index of the string in the list box. |
If an error occurs, the return value is -1 (for example, there was insufficient space to store the new string).
The following example will add the text string "apples" by value to the AListBox and will return the index in the string of the added item:
llb1AddItem = lb1.AddItem("apples")