Messenger Plus! Live - Scripting Documentation

The PlusWnd::Combo_AddItem function adds an item in a ComboBoxControl.

Syntax

[number] Combo_AddItem(
    [string] ControlId,
    [string] Label,
    [number, optional] ItemData,
    [string, optional] ImageId
);

Parameters

ControlId
[string] Unique identifier of the control.
Label
[string] Text label of the new item.
ItemData
[number, optional] If used, a number associated with the new item. It can be anything the developer wishes it to be.
ImageId
[string, optional] Identifier of the image to associate with the item. Accepted only in Messenger Plus! Live 4.50 and above. See remarks.

Return Value

If the new item is added successfully, the return value is the index of the new item in the combo's list. If not, the return value is -1.

This function typically fails for the following reason:

Remarks

Messenger Plus! Live 4.50 and above: to associate an icon with an item, the image must be specified in the ComboBox properties in the XML file ("Images" element). The height of the first image in the list defines the height of every item in the list. Also, remember that the ImageId parameter is the Id attribute specified with the image and not the image's name (its file name).

Function Information

Object PlusWnd
Availability Messenger Plus! Live 4.00

See Also

PlusWnd Object.