Autor Beitrag
barana
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Do 26.01.06 21:18 
Hallo Leute,

ich wollte mal fragen, wie man eine neue Image-Komponente im laufenden Programm erstellt. Ich hab es schon mal selbst versucht, aber ich verstehe noch nicht allzu viel von der Materie.

Beispiel: Man drückt auf einen Button und es erscheint ein Bild in einer Image. Drückt man erneut auf den Button erscheint ein Bild in einer neuen Image. Also muss bei jedem klick auf den Button eine neue Image erstellt werden, wobei die alten Images erhalten bleiben.

Ich hoffe ich habe mein Problem einigermaßen verständlich geschildert und bitte um eure Hilfe.

Danke im Voraus
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Do 26.01.06 22:02 
Kleiner Anfang - Image zur Laufzeit erzeugen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.Button1Click(Sender: TObject);
var
 Bild: TImage;
begin
  Bild:=TImage.Create(Self);
  Bild.Parent:=Self;
  Bild.Height:=100;
  Bild.Width:=100;
  Bild.Picture.LoadFromFile('Mein_Bild.bmp');
end;
barana Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Fr 27.01.06 14:01 
Jep, danke!