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

TDBGrid

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

TdbGrid - a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

Declaration

Source position: dbgrids.pas line 479

type TDBGrid = class(TCustomDBGrid)

public

  property BorderColor;

  

The colour of the border for this control

  property Canvas;

  

The area of a control on which its components are drawn or painted

  property DefaultTextStyle;

  

Default style for displaying text - includes alignment, layout, single or multi-lines

  property EditorBorderStyle;

  

The border style for the editor used in this grid

  property EditorMode;

  

Is grid ready to accept edits? (EditorMode True)

  property ExtendedColSizing;

  

ExtendedColSizing - the sizing to be used for extended columns

  property FastEditing;

  

Is the FastEditing method being used?

  property FocusColor;

  

The colour to be used for the cell receiving focus

  property FocusRectVisible;

  

FocusRectVisible - is the rectangle receiving focus visible?

  property GridLineColor;

  

Colour to be used for GridLines

  property GridLineStyle;

  

Style to be used for GridLines

  property SelectedColor;

  

Colour to be used for selected cells

  property SelectedRows;

  

SelectedRows - recorded as a bookmark list

published

  property Align;

  

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

  property AlternateColor;

  

The colour to be used for the background on alternate rows of the grid. Having alternate rows in different colours can make the grid easier to read.

  property Anchors;

  

The set of anchor definitions for this control

  property AutoAdvance;

  

Automatically advance down the grid on successive mouse clicks or presses of the ENTER or TAB key

  property AutoEdit;

  

Whether the Edit mode is automatically entered when a cell is selected

  property AutoFillColumns;

  

Automatically resize columns so they fill all grid's visible area

  property BorderSpacing;

  

Determines the border spacing for this control

  property BorderStyle;

  

BorderStyle - none, or single

  property Color;

  

Determine the colour for the current control

  property Columns;

  

The properties of the columns in this grid

  property Constraints;

  

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

  property DataSource;

  

The DataSource from which this grid displays - usually the result of a database Query

  property DefaultDrawing;

  

Is the default drawing method to be used for this grid? Default is TRUE

  property DefaultRowHeight;

  

Default value for the height of newly created grid rows.

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

  

The color for the fixed cells of the grid.

  property FixedCols;

  property FixedHotColor;

  

FixedHotColor - the 'Hot' colour for the active (selected, etc) fixed cells of the grid

  property Flat;

  

Is the cell to be displayed Flat, ie with no texturing or raised/lowered effect

  property Font;

  

The font to be used for text in this control (read/write).

  property HeaderHotZones;

  

HeaderHotZones - the zones of the header that are under the cursor, so are capable of being selected or pushed (or not!)

  property HeaderPushZones;

  

HeaderPushZones - the zones of the header that have been selected by the cursor, or pushed

  property Options;

  

The options available for use in this grid

  property OptionsExtra;

  

OptionsExtra - the extra options for this grid

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

  

PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control

  property ReadOnly;

  

Set True to prevent writing to grid; set False to allow modification

  property Scrollbars;

  

The ScrollBars to be used with this grid

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

  

The font to be used in the grid's title

  property TitleImageList;

  property TitleStyle;

  

The style to be used for the grid's title

  property UseXORFeatures;

  

UseXORFeatures: When True, the dotted focus rectangle is painted using the XOR raster operation

  property Visible;

  

Visible - can the control be seen?

  property OnCellClick;

  

Event handler for mouse click in a cell of the grid

  property OnColEnter;

  

Event handler if mouse enters column or it gains focus

  property OnColExit;

  

Event handler if mouse leaves column or it loses focus

  property OnColumnMoved;

  

OnColumnMoved - event handler for moving a column

  property OnColumnSized;

  

OnColumnSized - event handler for re-sizing a column

  property OnContextPopup;

  property OnDrawColumnCell;

  

Event handler if the cell in this column requires to be drawn

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

  

Event handler for when the Edit button is clicked

  property OnEditingDone;

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

  

Event handler if field is associated with an edit mask

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

  property OnMouseLeave;

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

  

OnPrepareCanvas - event handler for preparing canvas

  property OnSelectEditor;

  

OnSelectEditor - event handler for selecting editor

  property OnStartDrag;

  

Event handler for start of dragging operation

  property OnTitleClick;

  

Event handler for mouse click on Title

  property OnUserCheckboxBitmap;

  

OnUserCheckboxBitmap - event handler for a user accessing a checkbox bitmap

  property OnUTF8KeyPress;

  

UTF8KeyPress - event controller for a key being pressed while the control has focus.

end;

Inheritance

TDBGrid

  

TdbGrid - a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

|

TCustomDBGrid

  

TCustomDBGrid - the base class for TDBGrid , for displaying database information in the manner of a StringGrid

|

TCustomGrid

  

TCustomGrid - the base class for all grid controls

|

TCustomControl

  

TCustomControl - a base class for many window controls

|

TWinControl

|

TControl

|

TLCLComponent

  

TLCLComponent - base class for LCL components

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TdbGrid - a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

Inherits many of its properties from TCustomGrid and, of course, from TCustomDBGrid

See also

HowToUseDataAwareControls

  

HowToUseDataAwareControls - Hints for accessing databases

HowToUseGrids

  

How to use Grids including StringGrids, DrawGrids and DbGrids

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