Vcl.DBGrids.TCustomDBGrid.DefaultDrawDataCell
Delphi
procedure DefaultDrawDataCell(const Rect: TRect; Field: TField;
State: TGridDrawState); { obsolete }
C++
void __fastcall DefaultDrawDataCell(const System::Types::TRect &Rect, Data::Db::TField* Field, Vcl::Grids::TGridDrawState State);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.DbGrids.pas Vcl.DBGrids.hpp |
Vcl.DBGrids | TCustomDBGrid |
Description
Draws the text in a column cell.
Call DefaultDrawDataCell from an OnDrawDataCell event handler to lookup up the text representation of a field and write it to the cell. Unlike what the grid draws when the DefaultDrawing property is true, DefaultDrawDataCell gets the alignment for the text from the field component rather than the column descriptor, and it never draws a focus rectangle on selected cells.
The Rect parameter gives the position of the cell on the canvas. The Field parameter gives the field component that provides the data and alignment for the cell. The State parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (non-data) cell such as a column header.