Size image

Stimulsoft Reports.NET discussion
Post Reply
Donisetti Cosma
Posts: 3
Joined: Fri Feb 09, 2007 5:04 am
Location: Brasil

Size image

Post by Donisetti Cosma »

How to modify a image size, for programming?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Size image

Post 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.
Donisetti Cosma
Posts: 3
Joined: Fri Feb 09, 2007 5:04 am
Location: Brasil

Size image

Post by Donisetti Cosma »

tanks....but I want modify MultipleFactor Properties in runtime...
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Size image

Post by Vital »

You can use following code:

Code: Select all

StiImage image = report.GetComponents()["Image1"] as StiImage;
image.MultipleFactor = 2;
Thank you.
Donisetti Cosma
Posts: 3
Joined: Fri Feb 09, 2007 5:04 am
Location: Brasil

Size image

Post by Donisetti Cosma »

Ok. tanks.
Post Reply