var
i:Integer;
control:TComponent;
begin
for i := 0 to 99 do
begin
control := FindComponent('Edit'+IntToStr(i));
if control <> nil then
begin
TEdit(control).Text := IntToStr(i);
end;
end;
end;
转载于:https://www.cnblogs.com/Bung/archive/2011/05/17/2048334.html