W
wangchengwu
Unregistered / Unconfirmed
GUEST, unregistred user!
AQ_adkcjcx是一个ADOQUERY,Achievement是成绩字段,我下面这段是成绩小于60分的字体在网格中显示是红色,大于60分显示蓝色。
问题:为何我的的界面出现抖动,怎样消除?
procedure TFAcjdkcx.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
i:integer;
begin
with DBGrid1.Canvas do
begin
i:=Fdm.AQ_adkcjcx.fieldbyname('Achievement').AsInteger;
if (i<60) then
DbGrid1.Font.Color := clRed
else
DbGrid1.Font.Color := clBlue;
end;
DbGrid1.DefaultDrawColumnCell (Rect, DataCol, Column, State);
end;
问题:为何我的的界面出现抖动,怎样消除?
procedure TFAcjdkcx.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
i:integer;
begin
with DBGrid1.Canvas do
begin
i:=Fdm.AQ_adkcjcx.fieldbyname('Achievement').AsInteger;
if (i<60) then
DbGrid1.Font.Color := clRed
else
DbGrid1.Font.Color := clBlue;
end;
DbGrid1.DefaultDrawColumnCell (Rect, DataCol, Column, State);
end;