![]() |
Abfrage ob Component existiert
Hi Leute,
gibt es ne Möglichkeit zu prüfen, ob nen Object existiert? z.B:
Delphi-Quellcode:
Gibs so was?
...
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; ... MfG simon |
Re: Abfrage ob Component existiert
Hi!
Delphi-Quellcode:
So müssts funktionieren (Nicht getestet)...
VAR I:INTEGER; a:TObject;
begin for i:=1 to 9 do begin a:=FindComponent('label'+inttostr(i)); if (a) <> nil then... //so was z.b. end; end; lg |
Re: Abfrage ob Component existiert
Oder
Delphi-Quellcode:
if Assigned(a)
|
Re: Abfrage ob Component existiert
thx^^
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz