폼안의 컴포넌트를 모두 검사해서 에디트 컴포턴트면 저장하게 하는 함수를 원
하시는 것인지요? 그렇다면 다음과 같이 하시면 됩니다.
for i:=1 to 33 do
temp := 'edit' + inttostr(i) + '.text';
han[i] := temp
end;
-------------------------------------------------------------------------
procedure Form1.Button1Click(Sender: TObject);
var
I: Integer;
Temp: TComponent;
begin
for I := Form1.ComponentCount - 1 downto 0 do begin
Temp := Form1.Components[I];
if (Temp is TEdit) then
han[I] := (Temp as TEdit).Name;
end;
end;
|