TCustomComboBoxEx.Add function
Adds a new item to the extended combo-box control.
Declaration
function Add: Integer; overload
procedure Add(const ACaption: string; AIndent: Integer=- 1;
AImgIdx: TImageIndex=- 1; AOverlayImgIdx: TImageIndex=- 1;
ASelectedImgIdx: TImageIndex=- 1); overloadArguments
ACaption | Caption for the added item. |
AIndent | Indent for the added item. |
AImgIdx | Image index for the added item. |
AOverlayImgIdx | Overlay image index for the added item. |
ASelectedImgIdx | Select image index for the added item. |
Function result
Item added to the control.
Description
Add is an overloaded method used to add a new item to the extended
combo-box control. Both procedure and function variants are provided.
The function variant accepts no arguments, and returns an Integer value with the ordinal position in ItemsEx where the new item was inserted. The caption for the new item is set to the TComboExItem.cDefCaption constant.
The procedure variant does not return the new position for the inserted item. Use the Count property in ItemsEx to determine the ordinal position for the item on exit from the method. Use the parameters to specify the values stored in the corresponding properties in the TComboExItem class instance.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
