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

TDBImage

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

TDBImage - a data-aware Image box to display a single image from a dataset

Declaration

Source position: dbctrls.pp line 980

type TDBImage = class(TCustomImage)

protected

  procedure Notification(); override;

  

  procedure DataChange(); virtual;

  

DataChange - if data changed, load new picture

  procedure UpdateData(); virtual;

  

UpdateData - if data changed, save new picture

  procedure ActiveChange(); virtual;

  

ActiveChange - if datalink is active, send back new picture

  procedure PictureChanged(); override;

  

PictureChanged - software emulaton of the OnPictureChanged event

  procedure LoadPicture; virtual;

  

LoadPicture - loads picture into the appropriate field for the graphic class of the caller

  procedure Loaded; override;

  

protected

  class procedure WSRegisterClass; override;

public

  constructor Create(); override;

  

Create - constructor for TDBImage: cals inherited Create then sets style and display methods, forms datalinks and actions

  destructor Destroy; override;

  

Destroy - destructor for TDBImage: frees datalinks and calls inherited Destroy

  property Field: TField; [r]

  

The Field in which picture data are stored

  procedure Change; virtual;

  

Change - if picture is changes, datalink needs to be informed

published

  property Align;

  

Used to align the control to the top, bottom, left or right of its client.

  property Anchors;

  

The set of anchor definitions for this control

  property AutoDisplay: Boolean; [rw]

  

AutoDisplay - if True, automatically displays when focus is given

  property AutoSize;

  

Whether auto-size is to be used

  property BorderSpacing;

  

Determines the border spacing for this control

  property Center;

  

Should image be centered?

  property Constraints;

  

Determine Constraints (max and min height and width) for this control

  property DataField: String; [rw]

  

The name of the DataField that holds the image

  property DataSource: TDataSource; [rw]

  

The identity of the DataSource that holds the image

  property DragCursor;

  

DragCursor - the style of cursor to be used during the Drag process

  property DragMode;

  

DragMode - whether manual or automatic

  property OnClick;

  

Event Handler for mouse click

  property OnDblClick;

  property OnDragDrop;

  

Event handler for the drop of a control onto this control.

  property OnDragOver;

  

Event handler for the case when a control is dragged over another control

  property OnEndDrag;

  

Event handler for the end of a dragging process

  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 OnStartDrag;

  

Event handler for start of dragging operation

  property Proportional;

  

True if image is proportional

  property QuickDraw: Boolean; [rw]

  

QuickDraw - if True, quick drawing is implemented

  property ReadOnly: Boolean; [rw]

  

ReadOnly if True, image can be inspected byt not modified or written

  property Stretch;

  

True if picture is to be stretched

  property Transparent;

  

True if you can see through the image

  property Visible;

  

Visible - can the control be seen?

end;

Inheritance

TDBImage

  

TDBImage - a data-aware Image box to display a single image from a dataset

|

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

The Image is stored in the database as a Binary Large Object (BLOB)

See also

HowToUseDataAwareControls

  

HowToUseDataAwareControls - Hints for accessing databases

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