Delphi TDBGrid onDrawColumnCell Issue with first row

370 Views Asked by At

I have written a procedure for OnDrawColumnCell for TDBGRID. When i leave the mouse over the first Row of Grid, the OnDrawColumnCell is called continuously and never stops. Is there a way to work over with this?

procedure TInvoicesUnpaidGrid.dbgDrawColumnCell(Sender: TObject;
const Rect:   TRect; DataCol: Integer; Column: TColumn; 
State:TGridDrawState);
begin
if (dc.DataSet.FieldValues['Overdue']=1) then
  dbg.Canvas.Font.Color:=clRed;
end;
0

There are 0 best solutions below