Page 1 of 1

Size image

Posted: Fri Feb 09, 2007 5:06 am
by Donisetti Cosma
How to modify a image size, for programming?

Size image

Posted: Fri Feb 09, 2007 5:50 am
by Edward
To modifying the size of the StiImage component you should set Stretch property to true. The following code Adds an Image to page and sets its size.

Code: Select all

StiImage myImage = new StiImage();
myImage.Name = "myImage";
myImage.Stretch = true;
myImage.Height = 5;
myImage.Width = 10;
myImage.Image = Image.FromFile("myImage.jpg");
report.Pages[0].Components.Add(myImage);
Thank you.

Size image

Posted: Fri Feb 09, 2007 1:23 pm
by Donisetti Cosma
tanks....but I want modify MultipleFactor Properties in runtime...

Size image

Posted: Sat Feb 10, 2007 12:43 am
by Vital
You can use following code:

Code: Select all

StiImage image = report.GetComponents()["Image1"] as StiImage;
image.MultipleFactor = 2;
Thank you.

Size image

Posted: Mon Feb 12, 2007 2:50 pm
by Donisetti Cosma
Ok. tanks.