没跳进去~我现在这样写是否正确呢?
................
public
procedure test(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
end;
procedure TQCCWSJ.test(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
Dialogs.ShowMessage(' ');
end;
procedure TQCCWSJ.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
var
c,q: integer;
begin
if(ARow=5)and(ACol>0)then
begin
StringGrid1.Canvas.Brush.Color:=$FFECDD;
StringGrid1.Canvas.FillRect(Rect);
StringGrid1.OnDrawCell:=nil;
try
StringGrid1.OnDrawCell:=test;
finally
StringGrid1.OnDrawCell:=StringGrid1DrawCell;
end;
end;
end;
行的颜色改变了。但是还是12楼,而且不弹出提示框 |