RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomGrid.DrawCell Method

Provides the prototype for a method that draws the contents of a cell in the grid.

Pascal
procedure DrawCell(ACol: Longint; ARow: Longint; ARect: TRect; AState: TGridDrawState); virtual; abstract;
C++
virtual __fastcall DrawCell(Longint ACol, Longint ARow, TRect ARect, TGridDrawState AState) = 0;

Descendants of TCustomGrid implement the DrawCell method to draw the contents of the cell or to generate an OnDrawCell event. If the DefaultDrawing property is true, the background of the cell is painted before DrawCell is called, and the 3D effects of the fixed cells or the focus rectangle around the focused cell are drawn after DrawCell. 

The ACol and ARow parameters give the column and row indexes of the cell that should be drawn. The ARect parameter gives the boundaries of the cell in the coordinates of the canvas. The AState parameter indicates whether the cell is selected, whether the cell has input focus, and whether the cell is in the fixed, non-scrolling portion of the grid. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!