How to save the contents of this TStringgrid to a textfile?
Posted on 2005-04-12
How to have this baby handle a 20 col and 20 row TStringgrid filled with 400 characters?
procedure TForm1.Button2Click(Sender: TObject);
f : file;
arr : array [0..8] of char;
n : byte;
for n := 0 to 8 do arr[n] := StringGrid1.Cells[n mod 3, n div 3];
FileMode := fmOpenWrite;;
BlockWrite(f, arr, 9);
It would also be great when you would comment what you do. (the copy&paste stuff is still my favorite...well ofcourse :)