function TForm1.GetCtrls(Control: TWinControl): Boolean;
var
i: Integer;
obj: TWinControl;
begin
for i := 0 to Control.ControlCount - 1 do
begin
obj := TWinControl(Control.Controls[i]);
if obj is T某一类 then begin
//干你想干的
end;
if obj.ControlCount > 0 then
begin
GetCtrls(obj);
end;
end;
Result := True;
end;
递归遍历 某控件的所有子控件
最新推荐文章于 2023-04-09 15:30:34 发布