时间:2021-07-01 10:21:17 帮助过:49人阅读
procedure TDbgridForm.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin with DBGrid1 do begin if ((State = [gdSelected]) or (State=[gdSelected,gdFocused])) then begin Canvas.Font.Color :=ClYellow; Canvas.Brush.Color :=ClNavy; end else begin if DataSource1.DataSet.RecNo mod 2<>0 then Canvas.brush.Color :=ClWhite else Canvas.brush.Color :=clgreen; end; DefaultDrawColumnCell(Rect, DataCol, Column, State); end; end;
引用:https://bbs.csdn.net/topics/30305871
DBGridEh选择时高亮度显示问题 Delphi
标签:data pmc int user fan integer ado cno use