Hallo Leute!
Ich habe folgendes Problem:
Ich möchte ein oder mehrere Panel Komponenten zur Laufzeit einfügen und probiere das mit fogendem Code:
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.