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

# TCustomImage

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomImage - the base type for TImage

## Declaration

Source position: extctrls.pp line 733

`type TCustomImage = class(TGraphicControl)`
``
`class procedure WSRegisterClass; override;` |  | WSRegisterClass - Register this Class for the current Widget Set
`protected`
`procedure PictureChanged(); virtual;` |  | PictureChanged - software emulaton of the OnPictureChanged event
`function DestRect; virtual;` |  | DestRect - returns the location of the destination rectangle
`procedure CalculatePreferredSize(); override;` |  | CalculatePreferredSize - find default/preferred height and width
`protected`
`class function GetControlClassDefaultSize; override;` |  | Find the default size for this class of controls (by reference to parents)
`protected`
`procedure Paint; override;` |  | Virtual Paint method called in response to paint requests.
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomImage: calls inherited Create then sets default style, bounds and local variables: creates space for the picture
`destructor Destroy; override;` |  | Destroy - destructor for TCustomImage: frees picture then calls inherited Destroy
`property Canvas: TCanvas; [r]` |  | A clipping window to the parent canvas.
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property AutoSize;` |  | Whether auto-size is to be used
`property Center: Boolean; [rw]` |  | Should image be centered?
`property Constraints;` |  | Determine Constraints (max and min height and width) for this control
`property Picture: TPicture; [rw]` |  | Picture - the actual image for display
`property Visible;` |  | Visible - can the control be seen?
`property OnClick;` |  | Event Handler for mouse click
`property OnMouseDown;` |  | Event handler for when a mouse button is pressed down
`property OnMouseMove;` |  | Event handler for mouse movement within the current control
`property OnMouseUp;` |  | Event handler for when the mouse button is released, ie "up"
`property Stretch: Boolean; [rw]` |  | True if picture is to be stretched
`property Transparent: Boolean; [rw]` |  | True if you can see through the image
`property Proportional: Boolean; [rw]` |  | True if image is proportional
`property OnPictureChanged: TNotifyEvent; [rw]` |  | OnPictureChanged - event handler for a change in the picture
`end;`

## Inheritance

`TCustomImage` |  | TCustomImage - the base type for TImage
`TGraphicControl` |  | TGraphicControl is the base class for all lightweight controls.
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## Description

TCustomImage : The base type for TImage . This is a control of the class TGraphicControl , designed to be lightweight and fast

## See also

TGraphicControl |  | TGraphicControl is the base class for all lightweight controls.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .