Sollte dann ungefähr so aussehen (bei 4 Edits)
Delphi-Quellcode:
[...]
private
fEdits: Array[1..4] of TEdit;
[...]
procedure TForm1.FormCreate(Sender: TObject);
var LCount: Integer;
begin
for LCount := 1 to 4 do
begin
fEdits[LCount] := TEdit(FindComponent('Edit' + Inttostr(LCount)));
end;
end;
[...]
var LCount: Integer;
begin
for LCount := 1 to 4 do
begin
fEdits[LCount].Text := 'Testtext'; //allen Edits den selben Text zuweisen
end;
end;