procedure TForm1.dggrideh1DrawColumnCell(Sender: TObject;const Rect: TRect; DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
begin
if(adqry.FieldByName('status').AsBoolean) then
begin
dggrideh1.Canvas.Brush.Color:=clRed; //行底色變色
dggrideh1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
end;
改變行字體顏色:
procedure TForm1.dggrideh1DrawColumnCell(Sender: TObject;const Rect: TRect; DataCol: Integer; Column: TColumnEh; State: TGridDrawState);begin if(adqry.FieldByName('status').AsBoolean) then begin dggrideh1.Canvas.Font.Color:=clMaroon; //行字體變顏色 dggrideh1.DefaultDrawColumnCell(Rect,DataCol,Column,State); end;end;
本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。