给个例子吧………希望能成功!
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
r:TRect;
d:TStringGrid;
begin
if (ACol=0) or (ARow=0) then exit;
r.top:=Rect.top-1;
r.left:=Rect.Left-1;
r.right:=Rect.right+1;
r.Bottom:=Rect.Bottom+1;
d:=TStringGrid(Sender);
d.Canvas.Pen.color:=clRed; //////////////////////////
d.Canvas.Brush.color:=clYellow;
d.Canvas.Font.color:=clBlue;
d.Canvas.Pen.width:=1;
d.canvas.Rectangle (r);
d.canvas.TextOut (r.left+2,r.top+2,d.cells[ACol,ARow]);
end;