[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 487

type TCustomImage = class(TGraphicControl) end;

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  procedure PictureChanged(); virtual;

  

PictureChanged - software emulaton of the OnPictureChanged event

  procedure CalculatePreferredSize(); override;

  

Override this method to return the preferred height and width.

  class function GetControlClassDefaultSize; override;

  

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

  procedure Paint; override;

  

Override this method with your own painting code.

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 clipped window into the parent Canvas.

  function DestRect; virtual;

  

DestRect - returns the location of the destination rectangle

  procedure Invalidate; override;

  property AntialiasingMode: TAntialiasingMode; [rw]

  property Align: TAlign;

  

Specifies the placement of the control inside its Parent.

  property AutoSize: Boolean;

  

Allows to automatically adjust the size of the control, according to its content.

  property Center: Boolean; [rw]

  

Should image be centered?

  property KeepOriginXWhenClipped: Boolean; [rw]

  property KeepOriginYWhenClipped: Boolean; [rw]

  property Constraints: TSizeConstraints;

  

The minimal and maximal Width and Height of this control.

  property Picture: TPicture; [rw]

  

Picture - the actual image for display

  property Visible: Boolean;

  

Allows to show or hide the control, and all of its children.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnMouseDown: TMouseEvent;

  

Event handler for mouse button going down.

  property OnMouseEnter: TNotifyEvent;

  property OnMouseLeave: TNotifyEvent;

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler for mouse button going up.

  property OnMouseWheel: TMouseWheelEvent;

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  property Stretch: Boolean; [rw]

  

True if picture is to be stretched

  property StretchOutEnabled: Boolean; [rw]

  property StretchInEnabled: Boolean; [rw]

  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

  property OnPaintBackground: TImagePaintBackgroundEvent; [rw]

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 associated with widgets.

|

TComponent

?

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.