Use the ImageList Editor at design time to add bitmaps and icons to a TImageList component.
While working in the image list editor, you can click Apply to save your current work without exiting the editor, or click OK to save your changes and exit the dialog. Using the Apply button is especially useful because once you exit the dialog, you can't make any more changes to the existing images.
To display the ImageList editor select the TImageList object and double-click the component or right-click and select ImageList Editor.
The selected image control displays the currently selected image. This image can be changed by clicking on another image in the Images list view below. When an image is selected, you can delete it from the list of images. If the image was not added to the image list before the current invocation of the editor, you can use the other controls to alter its properties. However, once the image list editor is closed, these properties are fixed and the selected image controls are grayed if the ImageList Editor is again displayed and that image is selected.
Use the Transparent color drop-down to specify which color is used to create a mask for drawing the image transparently. The default transparent color is the color of the bitmap's left-most pixel in the bottom line. You can also change the transparent color by clicking directly on a pixel in the selected image.
When an image has a transparent color, any pixels in the image of that color are not rendered in that color, but instead appear transparent, allowing whatever is behind the image to show through.
If the image is an icon, Transparent color appears grayed and the transparent color is set to clNone. This is because icons are already masked.
Use the Fill color drop-down to specify a color that is added around the edges of the selected image when it is smaller than the dimensions indicated by the Height and Width properties of the image list control.
This control is grayed if the selected image completely fills the dimensions specified by the image list (that is, if it is at least as big as the Height and Width properties). This control is also grayed for icon images, because icons act like masks with any outer boundaries transparent.
Use the Options radio buttons to indicate how the image list should render the selected image if it does not fit exactly in the dimensions specified by the image list's Height and Width properties. (These buttons are disabled for icons.)
Crop Displays the section of the image beginning at the top-left, extending the image list width and height towards the bottom-right.
Stretch Causes the entire image to stretch so that it fits the image list width and height.
Center Centers the image within the image list width and height. If the image width or height is larger than the image list width or height, the image may be clipped.
Contains a preview list view of all the images in the image list, and controls for adding or deleting images from the list. Each image is displayed within a 24x24 area for easier viewing of multiple images. Beneath each image is a caption that indicates the zero-based position of the image within the image list. You can edit the caption to change an image's position in the list or drag the image to its new position.
Displays the Add Images dialog box, which lets you select one or more bitmaps or icons to add to the image list. The images then appear highlighted in the preview list view and their captions are assigned sequential values in the image list.
If a bitmap is larger than the image list width or height by even increments, a prompt appears asking whether the ImageList editor should divide the bitmap into several images. This is useful for toolbar bitmaps, which are usually composed of several small images in a sequence and stored as one larger bitmap.
Removes the selected images from the image list. All images left after clicking Delete are repositioned so they are a contiguous zero-based list.
Removes all images from the image list.
Allows you to save the selected image to a file. This file contains the bitmap in its currently altered state, including any cropping or stretching.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!