For i:=0 to Self.ComponentCount -1 Do
begin
if (Self.Components is TLabel) then
TLabel(Self.Components).Caption := '标识'+IntToStr(i);
end;
将Tedit改为TLabel
同意 :oldsheep35;
For i:=0 to Self.ComponentCount -1 Do
begin
if (Self.Components is TLabel) then //TEDIT改成TABLE就OK了
TLabel(Self.Components).Caption := '标识'+IntToStr(i);
end;