procedure TForm1.StringGrid2DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
  inherited;
  With StringGrid2 Do
  Begin
    If (ARow = 0) Or (ACol = 0) Then
      Canvas.Font.Color := clRed
    Else
    Canvas.Font.Color := clBlack;
    Canvas.Brush.Color := clWhite;
    Canvas.TextRect(Rect, Rect.Left + 3, Rect.Top + Trunc((RowHeights[ARow] - 14)/2), Cells[ACol, ARow]);
    DrawText(Canvas.Handle,pchar(Cells[Acol,Arow]),Length(Cells[Acol,Arow]),Rect,DT_WORDBREAK or DT_LEFT)
  End;
end;