Vcl.DBGrids.TCustomDBGrid.DefaultDrawColumnCell
Delphi
procedure DefaultDrawColumnCell(const Rect: TRect; DataCol: Integer;
Column: TColumn; State: TGridDrawState);
C++
void __fastcall DefaultDrawColumnCell(const Winapi::Windows::TRect &Rect, int DataCol, TColumn* Column, 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 DefaultDrawColumnCell from an OnDrawColumnCell event handler to lookup up the text representation of a field and write it to the cell. DefaultDrawColumnCell does exactly what the grid does when the DefaultDrawing property is true, except it never draws a focus rectangle on selected cells.
The Rect parameter is the position of the cell on the canvas. The DataCol parameter is the index of the column in the Columns array. The Column parameter is the TColumn object that describes the display attributes and field binding 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.