[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ImgList' (#lcl)

TCustomImageList.Assign

Stores properties from the specified image list to the current class instance.

Declaration

Source position: imglist.pp line 332

public procedure TCustomImageList.Assign(

  Source: TPersistent

); override;

Arguments

Source

  

Image list with properties stored in the current class instance.

Description

Assign is an overridden method used to store properties from the specified image list to the current class instance. Assign re-implements the method defined in TPersistent to include properties from TCustomImageList.

Source contains the TCustomImageList instance with the properties stored in the current class instance. No actions are performed in the method when Source is the same as the current class instance (Self).

Assign checks the class instance in Source to determine if it is derived from TCustomImageList. When it is a TCustomImageList descendant, existing resolutions and images in the current class instance are discarded. The following property value are copied from Source to the current image list instance:

The Resolutions enumerator in Source is used to get images for each image resolution and to reallocate the storage used for its raw image data. System.Move is called to copy the raw image data for the resolution from Source to the current class instance.

When Source is not derived from TCustomImageList, the inherited Assign method is called using Source as an argument.

See also

TCustomImageList.AssignTo

  

Assigns properties in an image list to another instance of the class.


Version 3.2 Generated 2024-02-25 Home