[Lazarus] StringGrid.LoadFromFile not loading col and row sizes

Jürgen Hestermann juergen.hestermann at gmx.de
Thu Aug 16 11:52:52 CEST 2012


Am 2012-08-16 11:22, schrieb Salvatore Coppola:
 > 2012/8/13 Jürgen Hestermann <juergen.hestermann at gmx.de>:
 >> When I store a StringGrid with
 >> StringGrid1.SaveOptions := [soDesign,soPosition,soAttributes,soContent];
 >> StringGrid1.SaveToFile(filename);
 >> and reload it later with LoadFromFile() it does not reload the column widths
 >> and row heigths.
 >> I can see that they are stored in the XML file but are ignored on loading.
 >> Am I doing something wrong?
 > Are you setting
 > StringGrid1.SaveOptions := [soDesign,soPosition,soAttributes,soContent];
 > before LoadFromFile() ?

Well, I was under the impression that the SaveOptions are for saving only
(therefore the name) so I use these settings before *saving*. But there
are no LoadOptions as far as I know. Therefore I didn't set it again before loading.

But now that you wrote it I tried it and yes, this seems to change it!
Totaly illogical but works.
Thanks for this information.

I even added a bug report ( http://bugs.freepascal.org/view.php?id=22640 )
which can be closed now (can I close it myself somehow?).





More information about the Lazarus mailing list