C
czdd
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TordersForm.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if orders_listForm.orders_d.fieldbyname('flag').asboolean=true then
begin
DBGrid1.Canvas.Brush.Color := clMoneyGreen;
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.Canvas.FillRect(Rect);
end
end;
这一段只能改变背景颜色,怎样改变字体的颜色呢?
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if orders_listForm.orders_d.fieldbyname('flag').asboolean=true then
begin
DBGrid1.Canvas.Brush.Color := clMoneyGreen;
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.Canvas.FillRect(Rect);
end
end;
这一段只能改变背景颜色,怎样改变字体的颜色呢?