[Overview][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 503

type TCustomImage = class(TGraphicControl)

protected

  class procedure WSRegisterClass; override;

  

Registers the class with the widgetset.

  procedure PictureChanged(); virtual;

  

Performs actions needed when the Picture property has been changed.

  procedure CalculatePreferredSize(); override;

  

Override this method to return the preferred height and width for the control.

  class function GetControlClassDefaultSize; override;

  

Returns the default size for this class of controls (when added to a form).

  procedure Paint; override;

  

Draws the image to the control canvas.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  property Canvas: TCanvas; [r]

  

A clipped window into the parent Canvas.

  function DestRect; virtual;

  

Gets the rectangle where the image is painted.

  procedure Invalidate; override;

  

Causes the control to be repainted.

  property AntialiasingMode: TAntialiasingMode; [rw]

  

Indicates if anti-aliasing is used when rendering the image.

  property Align: TAlign;

  

Specifies the placement of the control inside its Parent.

  property AutoSize: Boolean;

  

Allows automatic adjustment of the size for the control, according to its content.

  property Center: Boolean; [rw]

  

Indicates if the image should be centered.

  property KeepOriginXWhenClipped: Boolean; [rw]

  

Preserves the Left coordinate when a clipped image is centered.

  property KeepOriginYWhenClipped: Boolean; [rw]

  

Preserves the Top coordinate when a clipped image is centered.

  property Constraints: TSizeConstraints;

  

The minimum and maximum Width and Height for the control.

  property Picture: TPicture; [rw]

  

Contains the image displayed in the control.

  property Visible: Boolean;

  

Allows the control, and all of its children, to be displayed or hidden.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnMouseDown: TMouseEvent;

  

Event handler for mouse button going down.

  property OnMouseEnter: TNotifyEvent;

  

Event handler for mouse entering the area of the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler for mouse leaving the area of the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler for mouse button going up.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler for upward movement of the mouse wheel.

  property Stretch: Boolean; [rw]

  

Indicates if the image is resized to the client area for the control.

  property StretchOutEnabled: Boolean; [rw]

  

Allows the image to be resized proportionally when the image drawing area is resized.

  property StretchInEnabled: Boolean; [rw]

  

Allows the image to be resized proportionally when the image drawing area is resized.

  property Transparent: Boolean; [rw]

  

Indicates if the image has a clear, non-opaque background.

  property Proportional: Boolean; [rw]

  

True if image is proportional.

  property OnPictureChanged: TNotifyEvent; [rw]

  

Event handler signalled when Picture is changed.

  property OnPaintBackground: TImagePaintBackgroundEvent; [rw]

  

Event handler signalled to draw the background for the image.

end;

Inheritance

TCustomImage

  

TCustomImage - the base type for TImage.

|

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent

?

TObject

Description

TCustomImageis the base type for TImage. This is a control descended from TGraphicControl, and is designed to be lightweight and fast.

TCustomImage provides a Canvas that is used to render the bitmap graphic in its Picture property. Additional properties are provided to control how the image is rendered, and includes: AntialiasingMode, Stretch, Transparent, and Proportional.

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.