This is a migrated thread and some comments may be shown as answers.

specify width and height with InsertImage

1 Answer 53 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 08 Oct 2011, 06:39 PM
Hello,
is there a way to specify width and height for an image when insertimage method is called?

1 Answer, 1 is accepted

Sort by
0
Alex
Telerik team
answered on 13 Oct 2011, 08:17 AM
Hi Jon,

When using Insertimage method of the RadRichTextBox there is no way to specify the image size. This method will take care to automatically fit the image into the page if it is to large. If you want to insert an image with a specific size you can create the ImageInline on you own and the insert it in the RadRichTextBox using the InsertInline method. For example:

ImageInline imageInline = new ImageInline(imageStream, new Size(100, 100), "jpg");
this.radRichTextBox.InsertInline(imageInline);

I hope this was helpful.

All the best,
Alex
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Jon
Top achievements
Rank 1
Answers by
Alex
Telerik team
Share this question
or