- Home
- Forum
- ASP.NET MVC
- shapeImpl.LeftColumnOffset
shapeImpl.LeftColumnOffset
Hi Mark,
The position of the shape can be adjusted through Left and Top Property of ShapeImpl. These properties are measured as pixel units and LeftColumnOffset property is measured in EMU units. The following code snippets illustrates how to position an image.
Code example:
|
//Positioning a Picture IShape shape = worksheet.Pictures.AddPicture(1,1,GetFullTemplatePath("logo.png")); ShapeImpl shapeImpl = shape as ShapeImpl;
//Positioning a Picture shapeImpl.Left = 20; |
We have also shared a sample for your reference which can be downloaded from following link.
Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/InsertImage333251025
To know more about positioning and resizing picture, kindly go through the following UG documentation link.
UG Documentation link: http://help.syncfusion.com/file-formats/xlsio/working-with-pictures#positioning-and-re-sizing-pictures
Regards,
Dilli babu.
Hi Mark,
Regarding shape position:
It is not necessary to calculate column width of preceding column instead you can place the shape to its nearest cell by using LeftColumn and TopRow property. If you want to adjust its position, then set its Left and Top property before setting its cell position. The following code example illustrates this behavior.
Code example:
|
IShape shape = worksheet.Pictures.AddPicture(GetFullTemplatePath("logo.png")); ShapeImpl shapeImpl = shape as ShapeImpl;
//Positioning a Picture. shapeImpl.Left = 20; shapeImpl.Top = 10;
// Setting the picture to a cell. shapeImpl.LeftColumn = 5; |
We have also shared the sample for your reference which can be downloaded from following link.
Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/InsertImage565015846.zip
Regarding EM Units:
LeftColumnOffset property is measured in EM units and it does not depends on font size.
Regards,
Dilli babu.
Attachment: InsertImage_2df30c21.zip
We considered the requirement “Shapes left ant top position is changed while setting ColumnWidth propert” as a bug. We have logged a report on this and will fix the issue internally, also the fix will be included in our next main release 14.1, which has been scheduled to be rolled out in the month of March 2016.
We have also created an incident internally to have a follow up with this issue.
Regards,
Dilli babu.
- 6 Replies
- 2 Participants
-
MA Mark
- Feb 17, 2016 04:47 AM UTC
- Feb 23, 2016 04:03 AM UTC