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. Image for the cookie policy date

rotating text of column header

Hi,

I am writing to a pdf using the flow model. I am creating a table, and I want the text of the first row to be rotated.

My strategy for doing this is to AddParagraph() to the cells in that row, and then AppendCanvas for those paragraphs. Then, I am trying to AddText to that canvas, and rotating that text.

Generally, this is working. The problem is that when I use TextShape.Transform.Rotate, the origin appears to be absolute - it is set to somewhere in the upper left corner of the page. I have a screenshot of this.

What I am looking for is a way to change the point of rotation, or another way to accomplish what I am trying to do.

Thanks,
BenT

vertical-header.zip

5 Replies

BP Bhuvaneswari P Syncfusion Team February 7, 2007 10:47 AM UTC

Hi BenT,

Thanks for your detailed explanation.

I tried testing this issue with your specification, I was able to reproduce this issue. However you can work around this issue by changing the point of rotation by using the below code snippets:

canvas=table.Rows[0].Cells[0].AddParagraph().AppendCanvas(new SizeF( 100,100));

shape=canvas.AddText("Header1");

//This shape.Location property is used to change the point of rotation.

shape.Location = new PointF( 40, 20 );

shape.Transform.Rotate(10);

with this I have attached the sample for your reference:

Please let me know if you have any other questions.

Thanks for your interest in Syncfusion products.

Best Regards,
Bhuvaneswari



Sample-Rotation.zip


BT Ben Tsai February 7, 2007 08:03 PM UTC

Hi Bhuvaneswari,

Thanks for your example. I need one more thing to do what I want. Ultimately, I would like the rotated text to be at 270 degrees for each cell so that each cell contains text that reads vertically.

Currently, I can change the point of rotation, but I have to provide an absolute point. This point needs to be programmatically calculated for each cell, because the cells are not all at the same x-value. Does this make sense?

How can I accomplish this behavior?

Best regards,
BenT

>Hi BenT,

Thanks for your detailed explanation.

I tried testing this issue with your specification, I was able to reproduce this issue. However you can work around this issue by changing the point of rotation by using the below code snippets:

canvas=table.Rows[0].Cells[0].AddParagraph().AppendCanvas(new SizeF( 100,100));

shape=canvas.AddText("Header1");

//This shape.Location property is used to change the point of rotation.

shape.Location = new PointF( 40, 20 );

shape.Transform.Rotate(10);

with this I have attached the sample for your reference:

Please let me know if you have any other questions.

Thanks for your interest in Syncfusion products.

Best Regards,
Bhuvaneswari



Sample-Rotation.zip


AD Administrator Syncfusion Team February 8, 2007 01:27 PM UTC

Hi BenT,

The center point can be calculated only by using the X-value for each cell. In our current version,there are some problems in calculating the value since each cell has diff X-value.
I have logged a bug report with the development team and will get back to you within one week with the time frame as to when the bug fix will be available.

Thanks for your continued interest in Syncfusion products.

Best Regards,

Bhuvaneswari




Sample-Rotation0.zip


AD Administrator Syncfusion Team February 15, 2007 04:40 AM UTC

Hi BenT,

Thank you for your patience.

The fix for this issue will be available on March 20,2007.

Kindly let me know if you have any other questions.

Regards,
Bhuvaneswari


SJ Sivasankari J Syncfusion Team March 20, 2007 04:38 AM UTC

Hi BenT,

Thank you for the patience.We have fixed the issue. Could you please open an incident in the direct trac with the forum id as the subject line, so that we can send you the patch that resolves the issue?

http://www.syncfusion.com/Support/DirectTrac/logon.aspx

Regards,
Sivasankari

Loader.
Live Chat Icon For mobile
Up arrow icon