A
admin2008
Unregistered / Unconfirmed
GUEST, unregistred user!
就是当在dbgrideh控件当数量小于0时 显示为红色 反之绿色,这是代码 但是没有实现
请高手指点,dbgrideh显示是视图
procedure Tbad_bill_find.DBGridEh1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
begin
if adoquery1.fieldbyname('数量').Value <0 then
//if dbgrideh1.Fields[9].AsInteger<0 then
DBGrideh1.Canvas.Font.Color := clRed
else
DBGrideh1.Canvas.Font.Color := clblue;
end;
请高手指点,dbgrideh显示是视图
procedure Tbad_bill_find.DBGridEh1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
begin
if adoquery1.fieldbyname('数量').Value <0 then
//if dbgrideh1.Fields[9].AsInteger<0 then
DBGrideh1.Canvas.Font.Color := clRed
else
DBGrideh1.Canvas.Font.Color := clblue;
end;