Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
Delphi 5 Professional
|
Re: komponente suchen über alle Forms und Datenmodule
11. Jul 2005, 14:56
Delphi-Quellcode:
function GlobalFindComponent(const AName: String): TComponent;
function ComponentFind(AComponent: TComponent; AName: String): TComponent;
var
I: Integer;
begin
Result := AComponent.FindComponent(AName);
if not Assigned(Result) then
for I := 0 to AComponent.ComponentCount - 1 do
begin
Result := ComponentFind(AComponent.Components[I], AName);
if Assigned(Result) then
Break;
end;
end;
begin
Result := ComponentFind(Application, AName);
end;
Ciao, Sprint.
"I don't know what I am doing, but I am sure I am having fun!"
|