ComboEx Object
Parents Children Properties Methods Events
Purpose: The ComboEx object is an extended version of the Combo object that provides additional features including item images

Description

The ComboEx object is a ComboBox that supports item images and indenting. It is a superset of the Combo object and supports all its functionality. For further details, see Combo.

For most purposes, you can use the ComboEx object in place of the Combo object whether or not you make use of the extended features of the ComboEx.

Like the basic Combo, the list of text items in the ComboEx is specified by the Items property. You may associate images with each of the text items using the ImageListObj, ImageIndex and SelImageIndex properties.

To do so, ImageListObj specifies the name of an ImageList object that contains a set of images. ImageIndex and SelImageIndex map individual images from the ImageList to each of the text items specified by Items. ImageIndex specifies the image to be displayed when the item is not selected; SelImageIndex specifies the image to be displayed when the item is selected.

The Indents property specifies the amount by which each of the items are indented in units of 10 pixels

The appearance of the items is additionally controlled by the EditImage and EditImageIndent properties. These are Boolean and their effect is summarised in the table below. Notice that Images are displayed only if both these properties are set to 1 (which is the default).

There are certain restrictions that apply to a ComboEx object with Style 'Simple', namely:

  EditImageIndent
EditImage 0 1
0 No images displayed, item text is indented as specified by Indents No images displayed, item text is indented as specified by Indents plus the width of the images in ImageList
1 No images displayed, item text is indented as specified by Indents Images are displayed, items are indented as specified by Indents