Hi,
both events OnDrawColumnCelml and OnGetCellParams seem to get the same parameters.
I would kike to know what is the aim of the OnGetCellParams Event? Is it supposed to be faster? Or called only once for each cell?
Regards.
TCRDBGrid: OnDrawColumnCell or OnGetCellParams
Re: TCRDBGrid: OnDrawColumnCell or OnGetCellParams
Hello,
DrawColumnCell is an event of the standard DBGrid, GetCellParams is an event of our CRDBGrid. These events have different parameters:
TDrawColumnCellEvent = procedure (Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState) of object;
TGetCellParamsEvent = procedure (Sender: TObject; Field: TField; AFont: TFont; var Background: TColor; State: TGridDrawState; StateEx: TGridDrawStateEx) of object;
The GetCellParams event is called for each grid cell.
DrawColumnCell is an event of the standard DBGrid, GetCellParams is an event of our CRDBGrid. These events have different parameters:
TDrawColumnCellEvent = procedure (Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState) of object;
TGetCellParamsEvent = procedure (Sender: TObject; Field: TField; AFont: TFont; var Background: TColor; State: TGridDrawState; StateEx: TGridDrawStateEx) of object;
The GetCellParams event is called for each grid cell.
Re: TCRDBGrid: OnDrawColumnCell or OnGetCellParams
Yes, but DrawColumnCell is also called for each cell, and even more, for each drawing of the cell.
Is your GetCellParams called also at each drawing of the cell? Or only once?
Is your GetCellParams called also at each drawing of the cell? Or only once?
Re: TCRDBGrid: OnDrawColumnCell or OnGetCellParams
The GetCellParams event is called for each drawing.