Z
zpselect
Unregistered / Unconfirmed
GUEST, unregistred user!
我在DLL中对DBGrideh进行画布操作,编译不能通过!
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;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State)编译不能通过!
但是在Appliction中是可以通过的,在DLL中通不过,请问怎么写?
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;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State)编译不能通过!
但是在Appliction中是可以通过的,在DLL中通不过,请问怎么写?