Autor Beitrag
Ice
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114



BeitragVerfasst: Mo 09.12.02 14:59 
Hallo Leute!

Ich habe folgendes Problem:
Ich möchte ein oder mehrere Panel Komponenten zur Laufzeit einfügen und probiere das mit fogendem Code:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.Button1Click(Sender: TObject);
begin
 k := k+1;
 Raum := TPanel.Create(Form1);
 Raum.Name:='Panel'+inttostr(k);
 Raum.caption:='Panel'+inttostr(k);
 Raum.Left := Random(Form1.Width);
 Raum.Top := Random(Form1.Height);
 Raum.Show;
end;

es gelingt damit aber nicht.
Kann mir jemand helfen??

(09.12. 15:08 Tino) Code-Tags hinzugefügt.
Ice Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114



BeitragVerfasst: Mo 09.12.02 15:53 
Alles klar ich habe demn Fehler mit Hilfe eines anderen Threads gefunden, die Zeile :
ausblenden Quelltext
1:
Raum.Parent:=Form1.GroupBox1;					

hat noch gefehlt!

(09.12. 15:09 Tino) Code-Tags hinzugefügt.