Similar to standard combo but with ability to include pictures with each item in the list portion of the combo, with special facilities for list management.
Combo boxes combine the capabilities of a text box control and a list box control. Combo boxes allow the user to either enter text into the box or to choose one or more items from a list. If there are more items than will fit in the drop-down list, a scroll bar will be automatically added. Image Combo boxes allow indentation of the items within them.
Image Combo boxes must be used in conjunction with an associated Image List control, which contains the images to be used for the Image Combo box's items. Unlike regular combo boxes, which may be populated at design time using their List tab, an Image Combo box is populated with items programmatically at run time. Only the choice of which Image List is associated with the Image Combo box is made at design time.
To Add an Image Combo box to a Form
1. Click on the Insert Image Combo box button in the Tools toolbar.
2. Click and drag the location and size where it is to be created in the form.
3. Continue to create any additional combo boxes desired.
4. Right click onto each combo box and choose Properties from the context menu.
5. Set the properties for the combo box as desired.
6. Move, resize and align the combo box as desired.
7. Create and populate with images the Image List associated with this Image Combo.
8. Set the ImageList property to the associated Image List.
9. At run time, populate the Image Combo with items.
Properties
In addition to the properties listed below, a Control tab provides access to certain frequently used form properties for this control. See the Form Properties topic for information on those properties.
|
|
Combo box |
|
General |
|
|
MousePointer |
The type of mouse pointer displayed when over the combo box. Choose from 16 different types plus a custom pointer |
|
ImageList |
Associated ImageList control. |
|
OLEDragMode |
DragManual (default) or DragAutomatic. DragManual means the program handles all OLE drag/drop operations, while DragAutomatic means the combo box handles all OLE drag/drop operations |
|
OLEDropMode |
Set to None (default) if the combo box does not accept OLE drops and is to display the No Drop cursor if an OLE drop is attempted. Set to Manual, the combo box will trigger OLE drop events, allowing programs to handle the OLE drop operation in code. |
|
Indentation |
Starting indentation for items in the drop down list. |
|
Text |
Initial text string for the box. |
|
Enabled |
True or False. True means the object can respond to user-generated events, false prevents it from responding. We can disable a control like a combo box if we wish it to simply display information in a read-only way. |
|
Locked |
True or False. True means the user can scroll and highlight the text in the box but cannot change it. The program can change the text by modifying the text box's Text property. False (default) means users can edit the text in the box. |
|
|
|
|
Color |
|
|
Back Color |
Color to be used for the combo box's background. |
|
Fore Color |
Color to be used for the combo box's foreground, the color of the text caption. |
|
Color Set |
Choose from Standard Colors (standard Windows non-dithered colors) or Windows System Colors. The latter will be defined by the user's Control Panel settings and is normally the setting used so that the form changes appearance like the rest of Windows if the Control Panel settings are changed. |
|
Color Palette |
Displays available colors. Click on the property to be changed to highlight it in the Properties pane, click on the desired color in the Color Palette pane and then press Apply. |
|
Edit Custom Color |
Change the custom color presented in the Color Palette when the Color Set is set to Windows System Colors. |
|
|
|
|
Font |
|
|
Properties |
Font properties that may be changes. |
|
Font |
Choose a font installed on this system. It's wise to choose standard Windows fonts such as MS Sans Serif that are universally available. |
|
Size |
Size of font, in points. |
|
Effects |
Bold, Italic, Underline or Strikeout. |
|
Sample Text |
A preview of the selected settings. |
|
|
|
|
Picture |
|
|
MouseIcon |
Custom icon to use when the MousePointer property is set to 99. Like Visual Basic, will not load animated cursor (.ani) files. |