procedure TForm1.FormCreate(Sender: TObject);
procedure pScanWinControl(mWinControl: TWinControl);
var
I: Integer;
begin
for I := 0 to mWinControl.ControlCount - 1 do
begin
Memo1.Lines.Add(mWinControl.Controls[I].Name); //try
{ TODO }
if mWinControl.Controls[I] is TWinControl then
pScanWinControl(mWinControl.Controls[I] as TWinControl);
end;
end;
begin
pScanWinControl(Self);
Memo1.Lines.Add('--'); //try
pScanWinControl(GroupBox1);
end;
procedure pScanWinControl(mWinControl: TWinControl);
var
I: Integer;
begin
for I := 0 to mWinControl.ControlCount - 1 do
begin
Memo1.Lines.Add(mWinControl.Controls[I].Name); //try
{ TODO }
if mWinControl.Controls[I] is TWinControl then
pScanWinControl(mWinControl.Controls[I] as TWinControl);
end;
end;
begin
pScanWinControl(Self);
Memo1.Lines.Add('--'); //try
pScanWinControl(GroupBox1);
end;