DBGridEh选择时高亮度显示问题 Delphi

 
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

上一篇:T-SQL基础(一)之简单查询


下一篇:Flowable 数据库表结构说明、Flowable 数据字典说明