gtas
asked on
Writing StringGrid to/from a file
In D2, I have a string Grid that I want to save to a file, then later load
it from the file.
I can't seem to get the syntax right.
I've tried WriteToFile, but the Compiler complains, I apparently have to use
WriteToStream.
When I save the StringGrid, I don't appear to get all the information.
Here's my code.
var
fs : TFileStream;
begin
fs := TFileStream.Create('F:\BBB B', fmCreate or fmShareDenyWrite);
try
fs.WriteComponent(StringGr id);
except
ShowMEssage('Error writing Stream');
end;
fs.free;
Any ideas what I'm doing wrong?
Thanks
GMAN
it from the file.
I can't seem to get the syntax right.
I've tried WriteToFile, but the Compiler complains, I apparently have to use
WriteToStream.
When I save the StringGrid, I don't appear to get all the information.
Here's my code.
var
fs : TFileStream;
begin
fs := TFileStream.Create('F:\BBB
try
fs.WriteComponent(StringGr
except
ShowMEssage('Error writing Stream');
end;
fs.free;
Any ideas what I'm doing wrong?
Thanks
GMAN
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.