Visual Basic: Windows Controls

Visual Studio 6.0

ImageCombo Control

See Also    Example    Properties    Methods    Events

The ImageCombo control is a picture-enabled version of the standard Windows combo box. Each item in the list portion of the control can have a picture assigned to it.

In addition to supporting pictures, the ImageCombo provides an object and collection-based list control. Each item in the list portion of the control is a distinct ComboItem object, and together the items in the list make up the ComboItems collection. This makes it easy to specify properties such as tag text, ToolTip text, key value, and level of indentation on an item-by-item basis.

Syntax

ImageCombo

Remarks

With an ImageCombo control, you can display a list of items that includes pictures. Each item can have its own picture, or you can use the same picture for multiple list items.

The ImageCombo control contains a collection of ComboItem objects. A ComboItem object defines the various characteristics of the items that appear in the list portion of the control.

In addition to displaying pictures with list items, the ImageCombo control uses collections and objects to manage the list portion of the control. This makes it easy to manipulate entries in the list using familiar object and collection concepts, such as the Add, Remove and Clear methods, and the For Each and With... End With constructions.

Note   The ImageCombo control is part of a group of ActiveX controls that are found in the MSCOMCTL.ocx file. To use the ImageCombo control in your application, you must add the MSCOMCTL.ocx file to the project. When distributing your application, install the MSCOMCTL.ocx file in the user's Microsoft Windows System or System32 directory. For more information on how to add an ActiveX control to a project, see "Adding Controls to a Project" in the Programmer's Guide.

Show: