Bild mit Optimizer auf Form anzeigen
Fabian Feddern
Hallo,ich möchte mit Hilfe des Optimizers auf einem neuen Form ein Bild anzeigen.
Die Bilddatei ist in einem festen Pfad hinterlegt (z.B. c:bilder}bild.jpg)
Leder konnte ich hierzu kein Beispiel finden.
Fabian
Anders Olsson
Hi Fabian,You can use a PictureBox object to load an image and place onto a new form.
Example:
const string PIC_PATH = @"C:tmplogo.png";
SwissAddonFramework.UI.Components.PictureBox pb = SwissAddonFramework.UI.Components.PictureBox.CreateNew("myPic");
pb.Width = 100; // Image width
pb.Height = 50; // Image height
pb.Picture = PIC_PATH;
SwissAddonFramework.UI.Components.Form frm = SwissAddonFramework.UI.Components.Form.CreateNewForm("picForm", "picForm" + SwissAddonFramework.Utils.UniqueStringGenerator.Next());
frm.AddItem(pb);
frm.Load();
Regards,
Anders
Fabian Feddern
Danke, genau wonach ich gesucht habe.Fabian
0
Please sign in to leave a comment.
Comments
0 comments