anchor.diff:        else
         begin
           firstrow := FFirstRow;
  -        lastrow := firstrow;
  -        for row := firstrow to RowCount-1 do
  -        begin
  -          lastrow := row;
  -          inc (r.Top, DefaultRowHeight);
  -          if r.Top >= clipr.Bottom then
  -            break;
  -        end;
  +        lastrow := firstrow + (clipr.Bottom - r.Top) div DefaultRowHeight;
  +        if lastrow >= RowCount then
  +          lastrow := RowCount-1;
         end;
       end;
     end;
  
positive.code:     firstcol := FFirstCol;
    end;
  
    // calculate column widths, and first/last columns and rows
    if (ColumnCount <= 0) then
    begin
      firstcol := -1;
  
negative.code:     for col := firstcol to ColumnCount-1 do
      begin
        cWidths[col] := ColumnWidth[col];
        r.Width := cWidths[col];
        if (go_SmoothScroll in FOptions) and (r.Left <= clipr.Left) then
        begin
          firstcol := col;
          if col>0 then inc (cLeft, cWidths[col-1]);
        end;
        lastcol := col;
        if r.Right >= clipr.Right then
          break;
        inc (r.Left, r.Width);
      end;
      // first/last rows...
      if (RowCount <= 0) then
      begin
        firstrow := -1;
  