Unit MyDbgrids

*****************************************************} { } { Delphi Visual Component Library } { } { Copyright (c) 1995,96 Borland International } { } {

Classes

TMBookmarkList -
TMColumn -
TMColumnClass -
TMColumnTitle -
TMCustomDBGrid -
TMDBGrid -
TMDBGridColumns -
TMGridDataLink -

Functions

Register -

Types

TColumnValue
TColumnValues
TDBGridOption
TDBGridOptions
TDrawDataCellEvent
TMColumnButtonStyle
TMDBGridColumnsState
TMDrawColumnCellEvent

Constants

cm_DeferLayout
ColumnTitleValues
IndicatorWidth

Variables


Functions


procedure Register;


Types


TColumnValue = (cvColor, cvWidth, cvFont, cvAlignment, cvReadOnly, cvTitleColor,
    cvTitleCaption, cvTitleAlignment, cvTitleFont);

TColumnValues = set of TColumnValue

TDBGridOption = (dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator,
    dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect,
    dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect);

TDBGridOptions = set of TDBGridOption

TDrawDataCellEvent = procedure (Sender: TObject; const Rect: TRect; Field: TField;
    State: TGridDrawState) of object
The DBGrid's DrawDataCell virtual method and OnDrawDataCell event are only called when the grid's Columns.State is csDefault. This is for compatibility with existing code. These routines don't provide sufficient information to determine which column is being drawn, so the column attributes aren't easily accessible in these routines. Column attributes also introduce the possibility that a column's field may be nil, which would break existing DrawDataCell code. DrawDataCell, OnDrawDataCell, and DefaultDrawDataCell are obsolete, retained for compatibility purposes.
TMColumnButtonStyle = (cbsAuto, cbsEllipsis, cbsNone);

TMDBGridColumnsState = (csDefault, csCustomized);

TMDrawColumnCellEvent = procedure (Sender: TObject; const Rect: TRect;
    DataCol: Integer; Column: TMColumn; State: TGridDrawState) of object
The DBGrid's DrawColumnCell virtual method and OnDrawColumnCell event are always called, when the grid has defined column attributes as well as when it is in default mode. These new routines provide the additional information needed to access the column attributes for the cell being drawn, and must support nil fields.

Constants

cm_DeferLayout = WM_USER + 100

ColumnTitleValues = [cvTitleColor..cvTitleFont]

IndicatorWidth = 11


Variables