Control - Image List

images\btn_ctrl_imagelist.gif Contains a collection of images that can be used by other Windows Common Controls such as ListView, TreeView, TabStrip and Toolbar controls, as well as with other controls with a Picture property. Saves development time by maintaining all images in a standard, consistent catalog of images.

 

ImageList can use bitmap (.bmp), cursor (.cur), icon (.ico), JPEG (.jpg) or GIF (.gif) files for images. We can add/remove images at design time or at run time using the standard collection object properties (Key and Index) and the standard methods (Add, Remove, Clear, etc).

 

Use ImageList to store images representing open/closed folders, documents, etc for use in a TreeView. These can be dynamically assigned to the TreeView nodes as it expands or collapses. ImageList is a good place to save frequently used iconic images such as file open/close/print images for toolbar buttons or MousePointer icons and DragIcons.

 

To Add Images at Design Time

 

1. Click Insert Picture in the control's Images property tab.

2. Use the resulting Select Picture dialog to find the desired image file and open it (multiple files may be opened).

3. In the Key box assign a unique string for each image.

4. If desired, optionally assign a Tag string for each image. Tag strings need not be unique.

 

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.

 

 

Command Button

General

 

16 x 16, 32 x 32, 48 x 48, Custom

Image sizes in this control. Must be specified before any images are added. The size of the first image is what is used for all images when feeding images to a Windows Common Control bound to this one.

Height, Width

Size of image to use when Custom size is enabled.

UseMaskColor

If checked, enables use of mask color in a. A mask color is the color that is to be made transparent.

 

 

Images

 

Index

Integer that uniquely identifies an image in the ImageList collection. Numbered in order of creation from the first image, which is always 1.

Key

A unique string that identifies each image.

Tag

Stores a string available for the programmer to use as desired. Often used to store an identification string of some sort.

Images

Previews of the images in the ListImage collection. Add with InsertPicture and remove with RemovePicture.

Image Count

…Gosh… What could this number be?

 

 

Color

 

Back Color

Color to be used for image's background, if any.

Mask Color

Color to be treated as transparent in an image used when UseMaskColor is checked .

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.