Method XbpListBox():addItem() Foundation

Adds an item to the list of the list box.

Syntax
:addItem( <cItem> ) --> nItemPos
Parameters
<cItem>
<cItem> is a character string that is displayed as an item in the list of the XbpListbox object.
Return

This method returns a numeric value identifying the position in the list where the item is found after the method terminates.

Description

The :addItem() method is one of the most important methods of an XbpListBox object because it adds character strings to the list displayed by the object. Since :addItem() always adds character strings to the end of the list, the return value of this method is identical to the return value of :numItems().

If a character contains tab stop characters (Chr(9)), the string fragments separated by tab stops are aligned in columns. This way, an XbpListbox object can display data in multiple columns, although the :multiColumninstance variable is set to .F. (false). The tab stop positions can be defined with the :setTabstops(), so that individual column widths can be defined.

The tab character is not supported as a column separator for the list box part of an XbpCombobox object. If the character Chr(9) is present in <cItem>, an erroneous character is displayed.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.