kurze frage..
Wie check ich ob ein Objekt existiert? In meinem Fall ein TPanel in dem code meint er Panel0 existiert nicht. Was ja auch richtig ist, wird ja erst erstellt...
Wie check ich ob ein Objekt existiert? In meinem Fall ein TPanel in dem code meint er Panel0 existiert nicht. Was ja auch richtig ist, wird ja erst erstellt...
Code:
If Assigned(Panel0) then
showmessage('läuft nicht')
else
begin
for i:=0 to 6 do
begin
temp:=TPanel.Create(self);
temp.Parent:=Self;
temp.Name:='Panel'+IntToStr(i);
temp.left:=(10+(61*i));
temp.top:=(10);
temp.Width:=(60);
yesyesjo[i]:=temp;
yesyesjo[i].caption:=inttostr(lotto(1));
end;
end;