Description:
This function adds an item in the combo box. If the
Sorted property is set to true, then the item is inserted at the right position in order to maintain the combo list sorted. Other ways, the item is just added at the end of the list. In addition, after calling AddItem you cannot set the
Sorted property to true (resulting in an exception).
Item must be a string, number or
RImage depending on the column type or an array containing elements of the string, number or
RImage. The array must have at least one item for each column, respecting the column type; first array element must have the type of the first column and so on. However, the array can have more items than the number of columns, in which case the exceeding number of items will be not be displayed in the combo list.
Example
// for combo with one column
Combo.AddItem("Joe");
// for combo with two columns
Combo.AddItem(["Joe","Black"]);
// also, if you added one column as IMAGE_COLUMN and another one as COLUMN_NORMAL
myImage=new RImage(null);
myImage.Filename="picture.jpg";
Combo.AddItem([myImage, "me at the pet shop"]);