海信家电”换帅 “ 高玉玲接替代慧忠出任新任董事长
2024-11-22
图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}}
提交