Skip to main content

TcxImageCollection Class

Implements a collection capable of storing images of different formats and sizes.

Declaration

TcxImageCollection = class(
    TcxCustomComponent
)

Remarks

This component uses the TPicture type (see the collection item’s Picture property) in order to store images of different formats and sizes.

You can perform the following operations with the TcxImageCollection component:

  • Paint the stored images using the collection’s Draw overloaded methods. When drawing, you can apply image sizing and antialiasing.

  • Load frame images from a specified multi-frame image as individual collection items (AddFromMultiFrameImage).

  • Create a multi-frame TIFF image based on images stored in collection items (GetAsMultiFrameTIFF).

  • Dynamically synchronize the state of the control (that uses images in the image collection) with the collection’s state using a notification mechanism (see the AddListener and RemoveListener methods, and the IcxImageCollectionListener interface).

Images can be added to the component in the following ways:

  • At runtime – Use the Items collection property or call the AddFromMultiFrameImage method.

  • At design time – Click “Add Images…” in the component’s context menu to invoke the Open File dialog and select one or more image files in the dialog. Click “Add Images from Icon Library…” to invoke the Image Picker dialog, which allows you to load images from the DevExpress Icon Library. Any of these methods automatically create collection items and load images to them from the selected files. Alternatively, you can invoke the standard collection editor for the Items collection property, add collection elements one by one, and load images to them via an element’s Picture property. To invoke the collection editor, do one of the following:

  • Double-click the TcxImageCollection component;

  • Click Edit… in the component’s context menu;

  • Click the ellipsis button next to the Items collection property.

Inheritance

See Also