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

type TDBImage = class(TCustomImage) end;

protected

  procedure Notification(); override;

  

  procedure DataChange();

  

DataChange - if data changed, load new picture

  procedure UpdateData(); virtual;

  

UpdateData - if data changed, save 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

  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

  function ExecuteAction(); override;

  function UpdateAction(); override;

  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: TAlign;

  

Specifies the placement of the control inside its Parent.

  property Anchors: TAnchors;

  

The set of anchor definitions for this control.

  property AutoDisplay: Boolean; [rw]

  

AutoDisplay - if True, automatically displays when focus is given

  property AutoSize: Boolean;

  

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

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property Center: Boolean;

  

Should image be centered?

  property Constraints: TSizeConstraints;

  

The minimal and maximal Width and Height of 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: TCursor;

  

The cursor shape shown while the control is dragged.

  property DragMode: TDragMode;

  

Allows the user to drag the control.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnDblClick: TNotifyEvent;

  property OnDBImageRead: TOnDBImageRead; [rw]

  

Event to read a custom header from image stream.

  property OnDBImageWrite: TOnDBImageWrite; [rw]

  

Event to write a custom header into image stream.

  property PopupMenu: TPopupMenu;

  property OnDragDrop: TDragDropEvent;

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent;

  

Event handler for a control being dragged over this control.

  property OnEndDrag: TEndDragEvent;

  

Notification handler for the end of a dragging operation.

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

  

Event handler for the start of a dragging operation.

  property Proportional: Boolean;

  

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: Boolean;

  

True if picture is to be stretched

  property Transparent: Boolean;

  

True if you can see through the image

  property Visible: Boolean;

  

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

  property WriteHeader: Boolean; [rw]

  

Write a header in the image stream.

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

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

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.