Hello,
I use Delphi 11 Update 3 on Windows 11, and TMS VCL UI Pack 12.2.0
I have found a bug in the TAdvStringGrid component when I add comments in cells of a grid, then hide columns and remove all comments.
I send you a ZIP attchment in which you will have the source files of the Demo, and 2 GIF illustrating the bug and a possible correction
Possible correction of the procedure
procedure TForm1.RemoveAllCommentsFixedClick(Sender: TObject);
var
i,j: Integer;
begin
// It's a copy of the procedure TAdvStringGrid.RemoveAllComments, with a possible correction
for i := 0 to MyAdvGrid.AllColCount - 1 do {AllColCount instead of ColCount}
for j := 0 to MyAdvGrid.AllRowCount - 1 do {AllRowCount instead of RowCount}
MyAdvGrid.RemoveComment(i,j);
MyAdvGrid.Invalidate;
end;
Bug TMS AdvStringGrid Comments.zip (200.8 KB)