TAdvStringGrid merge cells


i found a bug in the component TAdvStringGrid.

Please have a look in the module BaseGrid.pas and the function CellRect.

the problem is, that when i am using the function grid.AddNode() with Span > 0 and additionally assign objects for the nodes the paint routine merge cells if i contract a node.

I have solved the bug, please check my remarks ( the default value for CellSpanX = -1, this is wrong in this situation).

function TBaseGrid.CellRect(c,r: integer): TRect;

      if r1.Left = r1.Right then
        r1.Right := r1.Right + 1;

      // *** added wg 15.12.2015
      iCellSpanX := CellProperties[BC.X,BC.Y].CellSpanX;
      if ( iCellSpanX < 0 ) then
        iCellSpanX := 0;

      r2 := GetCellRect(ro + iCellSpanX,BC.Y + CellProperties[BC.X,BC.Y].CellSpanY);
      //r2 := GetCellRect(ro + ,BC.Y + CellProperties[BC.X,BC.Y].CellSpanY);

      if r2.Left = r2.Right then
        r2.Left := r2.Left - 1;



Are you using the latest version TAdvStringGrid v7.9.0.0:


i have installed the ComonentPack Version V8.0.0.0.
The GridVersion is V7.8.4.0.

Please use TMS Component Pack v8.0.7.0 as this has fixed wrt cell merging.

thanx, with the new version the problem is solved.