Мне необходимо считать матрицу с .txt фаила. Программа написана, но падает с ошибкой Left side cannot be assigned to. Знаю, что дело в какой-то property, у которой надо снаять ReadOnly. Но у какой?
Помогите ее найти.
Код:
procedure TForm1.Button2Click(Sender: TObject);
var
i,j:integer;
input: textfile;
begin
if not OpenDialog1.Execute then exit;
AssignFile(input,OpenDialog1.FileName);
Reset(input);
i:=0;
while not EOF(input) do
begin
j:=0;
while not EOLN(input) do
begin
Read(input,StringGrid1.cells[i,j]); /// The Error Here!!!
inc(j);
stringGrid1.ColCount := j+1;
end;
inc(i);
stringGrid1.RowCount := i+1;
readln(input);
end;
closefile(input);
end;