[fpc-devel] TStringGrid behaviour
Jesus Reyes
jesusrmx at yahoo.com.mx
Wed Oct 27 19:25:42 CEST 2010
--- El mié 27-oct-10, Birger Jansen <birger at cnoc.nl> escribió:
> De: Birger Jansen <birger at cnoc.nl>
> Asunto: [fpc-devel] TStringGrid behaviour
> A: fpc-devel at lists.freepascal.org
> Fecha: miércoles, 27 de octubre de 2010, 7:32
> Hi all,
>
> I have the following code that throws an error in FPC and
> runs fine in Delphi:
> MyStringGrid.RowCount := 0;
> MyStringGrid.RowHeights[0] := 1;
>
> Delphi checks if the grid has at least
> In FPC there is no check on RowCount before the height is
> set, resulting in a List index(0) out of bounds exception.
> Although it is correct, it is annoying :-)
>
> It can be fixed by adding something like this to the
> beginning of TCustomGrid.Setrowheights:
>
> if ARow <= FRows.Count then EXIT;
>
> Shall I file a report for this?
>
> Kind regards,
> Birger Jansen
As somebody already noted, this belong to the Lazarus List.
Delphi and Lazarus grids have many similar features but not all, this is a case where they differ, and it's already reported here http://bugs.freepascal.org/view.php?id=17538 , see also related reports and feel free to add your comments there.
Jesús Reyes A.
More information about the fpc-devel
mailing list