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

# TDBGroupBox

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

TDBGroupBox - a data-aware version of TGroupBox, allowing a number of data-aware objects to be grouped together on a form

## Declaration

Source position: dbctrls.pp line 919

`type TDBGroupBox = class(TCustomGroupBox)`
`FDataLink: TFieldDataLink;` |  | FDataLink - local variable storing the identity of the Field Data Link
`function GetDataField;` |  | GetDataField - returns the name of the data field
`function GetDataSource;` |  | GetDataSource - returns the identity of the data source
`function GetField;` |  | GetField - returns the identity of the field to which the group box is atttached
`procedure SetDataField();` |  | SetDataField - specifies the data field to which the group box is attached
`procedure SetDataSource();` |  | SetDataSource - specifies the data source to be used by the group box
`procedure CMGetDataLink(); message;` |  | CMGetDataLink - control message for finding the data link
`protected`
`procedure DataChange(); virtual;` |  | DataChange - if Data changed, loads the new data into the caption
`procedure Loaded; override;`
`procedure Notification(); override;`
`public`
`constructor Create(); override;` |  | Create - constructor for TDBGroupBox: calls inherited Create then sets up datalinks and actions
`destructor Destroy; override;` |  | Destroy - destructor for TDBGroupBox: frees datalinks 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 Anchors;` |  | The set of anchor definitions for this control
`property BorderSpacing;` |  | Determines the border spacing for this control
`property Caption;` |  | Caption - the text-string appearing on the Control, usually used to identify its function
`property ClientHeight;` |  | ClientHeight - determines the height of the client within which the control exists
`property ClientWidth;` |  | ClientWidth - determines the width of the client within which the control exists
`property Color;` |  | Determine the colour for the current control
`property Constraints;` |  | Determine Constraints (max and min height and width) for this control
`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 DragMode;` |  | DragMode - whether manual or automatic
`property Enabled;` |  | Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'
`property Font;` |  | The font to be used for text in this control (read/write).
`property OnClick;` |  | Event Handler for mouse click
`property OnDblClick;` |  | Event Handle for mouse double-click
`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 OnEnter;` |  | OnEnter - event handler for when the mouse enters the control, and the control receives focus
`property OnExit;` |  | OnExit - event handler for when the mouse leaves the control and it loses focus
`property OnKeyDown;` |  | OnKeyDown - event handler for instance when key is down while control has focus
`property OnKeyPress;` |  | OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.
`property OnKeyUp;` |  | OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus
`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 OnResize;` |  | Event Handler for resize of control
`property OnStartDrag;` |  | Event handler for start of dragging operation
`property OnUTF8KeyPress;` |  | UTF8KeyPress - event controller for a key being pressed while the control has focus.
`property ParentColor;` |  | ParentColor - should the control have the same colour as the parent? Default is true
`property ParentFont;` |  | ParentFont - should the control use the same font as the parent? Default is true
`property ParentShowHint;` |  | ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true
`property PopupMenu;` |  | PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
`property ShowHint;` |  | Flag to determine: Is hint to be displayed for this control?
`property TabOrder;` |  | The place this control occupies in the list of tabs
`property TabStop;` |  | Is the control in the sequence of controls accessed by successive presses of the Tab key?
`property Visible;` |  | Visible - can the control be seen?
`end;`

## Inheritance

`TDBGroupBox` |  | TDBGroupBox - a data-aware version of TGroupBox, allowing a number of data-aware objects to be grouped together on a form
`TCustomGroupBox` |  | TCustomGroupBox - the base class for TGroupBox, TRadioGroup and TCheckGroup
`TWinControl`
`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 .