Vcl.DBGrids.TCustomDBGrid.DrawCell

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;

C++

virtual void __fastcall DrawCell(int ACol, int ARow, const System::Types::TRect &ARect, Vcl::Grids::TGridDrawState AState);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TCustomDBGrid

Description

Draws the cell specified by the ACol and ARow parameters.

DrawCell overrides the inherited method to use the Columns property when drawing cells in the grid.

DrawCell sets up the font and brush and paints the background of the cell. If the DefaultDrawing property is true, DrawCell fetches the data for the cell and writes it to the position described by the ARect parameter. Whether DefaultDrawing is true or false, DrawCell generates the OnDrawDataCell and OnDrawColumnCell events. Finally, if DefaultDrawing is true and either the cell has focus or the cell is selected and Options includes dgAlwaysShowSelection, DrawCell draws a focus rectangle around the cell.

See Also