Код:
procedure TForm1.Button1Click(Sender: TObject);
function st(ds: string): string;
begin
Result:= ds;
while Length(Result) < 4 {exp. '123 '} do
Result:= Result + ' ';
end;
var
i: integer;
sx, sy: string;
begin
for i := 0 to 21 do
begin
sx:= sx + st(StringGrid1.Cells[i,0]);
sy:= sy + st(StringGrid1.Cells[i,1]);
end;
with TStringList.Create do
try
Add(sx);
Add(sy);
SaveToFile('tmp.txt');
finally
Free;
end;
end;
__________________
Помогаю платно.
Помогаю иногда бесплатно.
|