RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDBGrid.DefaultDrawColumnCell Method

Draws the text in a column cell.

Pascal
procedure DefaultDrawColumnCell(const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
C++
__fastcall DefaultDrawColumnCell(const TRect Rect, int DataCol, TColumn Column, TGridDrawState State);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!