iQOO预告新旗舰:Z9 Turbo搭载骁龙8s Gen3即将亮相
2024-04-03
图1 |
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if Table1.FieldByName(’Salary’).AsCurrency>36000 then //指定所需改变颜色行的条件表达式 DBGrid1.Canvas.Font.Color:=clMaroon; //指定颜色为clMaroon DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State); end; |
图2 |
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if Table1.FieldByName(’Salary’).AsCurrency>36000 then DBGrid1.Canvas.Brush.Color:=clWhite; DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State); end; |
图3 |
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if Table1.FieldByName(’Salary’).AsCurrency>40000 then begin DBGrid1.Canvas.Font.Color:=clWhite; DBGrid1.Canvas.Brush.Color:=clBlack; end; if DataCol = 4 then DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State); end; |
评论 {{userinfo.comments}}
{{child.content}}
{{question.question}}
提交