Einzelnen Beitrag anzeigen

smt

Registriert seit: 29. Okt 2007
15 Beiträge
 
#1

PictureBox dynamisch erzeugen (.net)

  Alt 8. Mai 2008, 14:55
Hallo,

ich hätte da ein Problem..

Wieso zeigt diese Routine nichts an?



Delphi-Quellcode:
     with System.Windows.Forms.PictureBox.create do begin
         Parent := Panel1;
         Location.X:=10;
         Location.Y:=10;
         Size.Width:=50;
         Size.Height:=100;;
         Image.FromFile('2h.png');
         Visible:=True;
         show;
      end;
Ich versuche damit eine Picturebox dynamisch in ein Panel zu erzeugen. Und ich glaube auch, daß die Picturebox da ist, aber sie zeigt das Bild nicht an.
Hat jemand eine Lösung?

Vielen Dank

- Sascha -
  Mit Zitat antworten Zitat