Autor Beitrag
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 30.11.04 22:23 
Moin,

Ich erstelle ein paar Panels dynamisch mit:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure erstellePanels(Panels:integer);
var Panel : TPanel;
begin
 for i := 1 to Panels do
  begin
   Panel := TPanel.Create;
   {...}
  end;
 showmessage(inttostr(componentcount));
end;


Eigentlich müsste ja als Componentcount = Panels rauskommen.
Die Funktion liefert allerdings 0 zurück. Die eben erstellten Panels werden als nicht mitgezählt.
Auch über FindComponent werden die Panels nicht gefunden!


Was habe ich denn vergessen?
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Di 30.11.04 22:43 
Hast du Create auch mit Self gesetzt?

_________________
Ciao, Sprint.
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Di 30.11.04 22:51 
Wichtig ist was als Parameter im Create steht ....

Self bzw. Form1
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 30.11.04 22:54 
argh, habs mit nil erstellt :oops: :lol:

danke!