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

# TDBText

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

TDBText - a data-aware text component to display a single text-string from a dataset

## Declaration

Source position: dbctrls.pp line 280

`type TDBText = class(TCustomLabel)`
`protected`
`procedure Loaded; override;`
`procedure Notification(); override;`
`protected`
`class procedure WSRegisterClass; override;`
`public`
`constructor Create(); override;` |  | Create - constructor for TDBText: calls inherited Create then forms data links and actions
`destructor Destroy; override;` |  | Destroy - destructor for TDBText: frees data links then calls inherited Destroy
`property Field: TField; [r]` |  | The field in the DataSet to which this control is to be linked. Can be referred to by name, or as an index
`published`
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property Alignment;` |  | Alignment - whether text is centered, left- or right-justified
`property Anchors;` |  | The set of anchor definitions for this control
`property AutoSize;` |  | Whether auto-size is to be used
`property BidiMode;`
`property BorderSpacing;`
`property Color;` |  | Determine the colour for the current control
`property Constraints;`
`property DataField: String; [rw]` |  | The name of the field, as a string (ie cannot be referred to as an Index)
`property DataSource: TDataSource; [rw]` |  | The DataSource from which information is obtained to display in this control. Usually the result of a SQLQuery
`property DragCursor;` |  | DragCursor - the style of cursor to be used during the Drag process
`property DragKind;`
`property DragMode;` |  | DragMode - whether manual or automatic
`property Enabled;`
`property FocusControl;` |  | FocusControl - which control has focus
`property Font;` |  | The font to be used for text in this control (read/write).
`property Layout;` |  | Layout - How the Text is to be laid out in the text rectangle: at the Bottom, Centre or Top
`property ParentBidiMode;`
`property ParentColor;`
`property ParentFont;`
`property ParentShowHint;`
`property PopupMenu;`
`property ShowAccelChar;` |  | ShowAccelChar - underline the character in the label that acts as an accelerator with a shortcut key
`property ShowHint;`
`property Transparent;`
`property Visible;` |  | Visible - can the control be seen?
`property WordWrap;` |  | WordWrap - whether a word is to be wrapped to the next line if the text is about to become too long for the width available
`property OnClick;`
`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;`
`property OnMouseMove;`
`property OnMouseUp;`
`property OnMouseEnter;`
`property OnMouseLeave;`
`property OnChangeBounds;`
`property OnContextPopup;`
`property OnResize;`
`property OnStartDrag;` |  | Event handler for start of dragging operation
`property OptimalFill;`
`end;`

## Inheritance

`TDBText` |  | TDBText - a data-aware text component to display a single text-string from a dataset
`TCustomLabel` |  | TCustomLabel : the base type from which TLabel is derived.
`TGraphicControl` |  | TGraphicControl is the base class for all lightweight controls.
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## See also

HowToUseDataAwareControls |  | HowToUseDataAwareControls - Hints for accessing databases

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