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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

pointstopixels

Thread ID:

Created:

Updated:

Platform:

Replies:

54692 Jan 15,2007 04:27 PM UTC Jan 16,2007 01:17 PM UTC WinForms 4
loading
Tags: XlsIO
Giancarlo Aguilera
Asked On January 15, 2007 04:27 PM UTC

Hi!

Is there anything within xlsio that will convert pixels to points??? If not, is OK to use the measurements class located in the Diagram assembly????


Thanks

GA


GA
Replied On January 15, 2007 04:29 PM UTC

I'm sorry, I meant to say "Is there anything within xlsio that will convert POINTS to PIXELS???

Thanks

GA

>Hi!

Is there anything within xlsio that will convert pixels to points??? If not, is OK to use the measurements class located in the Diagram assembly????


Thanks

GA


Melba Winshia [Syncfusion]
Replied On January 16, 2007 12:38 PM UTC

Hi GA,

The height of cells is displayed in points and pixels rather than in inches. By using GetRowHeightInPixels method we can get the points (row height) in pixels. Use the following code snippets to get points in pixels.

//Set the row height in points.
sheet.Range["A1"].RowHeight=18;

//Get the row height (points) in pixels.
sheet.GetRowHeightInPixels(1);

Here is the sample for your reference:

Pointstopixel.zip

Please take a look and let me know if you have any other questions.

Best Regards,
Melba



Administrator [Syncfusion]
Replied On January 16, 2007 12:51 PM UTC

Also there is following method in IApplication interface
float ConvertUnits( float value, MeasureUnits from, MeasureUnits to );

Melba Winshia [Syncfusion]
Replied On January 16, 2007 01:17 PM UTC

Hi,

Yes, you can do with ConvertUnits method also. Here is the code snippet to achieve this.

//To convert points to pixel
float pixelvalue=application.ConvertUnits(18,MeasureUnits.Point,MeasureUnits.Pixel);

Here is the sample for reference:

Pointstopixel.zip

Please let me know if you have any other questions.

Thanks,
Melba

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.

Warning Icon 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.Close Icon

;