AdvStringGrid Header Resize Index Out of Range


I wanted to point out something that had me stumped for awhile.

I have an AdvStringGrid with 0 fixed columns, 1 fixed row and 3 columns.  I set column resizing to true in options.  When I resize the right-most column to the right (expand it), I get a list index out of range (-1) error.

I have this procedure for sorting:

AdvStringGrid1FixedCellClick(Sender: TObject; ACol, ARow: Integer);

The problem occurs because when resizing the right-most column to the right, it calls this method with an ACol of -1.

I did not expect this method to be called when resizing columns, so I have added a check to make sure the ACol is in a valid range.



Thanks for reporting. This is indeed an unexpected behavior and we've fixed this.
The next update will address this.