Einzelnen Beitrag anzeigen

Benutzerbild von SimonRap
SimonRap

Registriert seit: 17. Okt 2009
Ort: Mahlow
147 Beiträge
 
Delphi 6 Personal
 
#1

Abfrage ob Component existiert

  Alt 28. Feb 2010, 13:32
Hi Leute,
gibt es ne Möglichkeit zu prüfen, ob nen Object existiert?
z.B:
Delphi-Quellcode:
...
VAR I:INTEGER; a:TObject;
begin
  for i:=1 to 9 do
  begin
    a:=FindComponent('label'+inttostr(i));
    if componentexists(a) then... //so was z.b.
  end;
end;
...
Gibs so was?

MfG simon
Simon
  Mit Zitat antworten Zitat