We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Changing font properties of an ITextBoxShape object

Thread ID:

Created:

Updated:

Platform:

Replies:

82149 Jun 3,2009 01:20 PM Aug 30,2012 07:54 AM Windows Forms 1
loading
Tags: XlsIO
jo smith
Asked On June 3, 2009 01:20 PM

Hie,

i'de like to know how can i change properties like Bold, Font type, etc... of the text i insert into an ITextBoxShape object ?

Thanks.

Manoj Kumar G M [Syncfusion]
Replied On August 30, 2012 07:54 AM

Hi Elad,

Thank you for choosing Syncfusion products.

You can also use rich-text formatting for the textbox elements to enhance their appearance.

The following code examples explain how to apply rich-text formatting to the textbox elements.

            IFont redFont = workbook.CreateFont();

 

            redFont.Bold = true;

 

            redFont.Italic = false;

 

            redFont.Size = 6;

 

            redFont.FontName = "Georgia";

 

            redFont.Color = ExcelKnownColors.Red;

 

            ITextBoxShape textbox = sheet.TextBoxes.AddTextBox(3, 7, 25, 100);

            textbox.RichText.Text="Essential XlsIO";

 

            textbox.RichText.SetFont(0,14, redFont);

 

Please let us know if you require any further clarifications.

Regards,

Manojkumar.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;