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
close icon

Change thetext direction on Text Box

I'am using DOCIO, as word when we create a text box we can change the text direction (as rotate the text on the text box). How I can implmente this feature en DOCIC.

6 Replies

RA Rajendran Syncfusion Team February 8, 2010 02:28 PM UTC

Hi Chaouki,

Thank you for your interest in Syncfusion products.

Currently we don’t have a feature to support text direction in text box. We have already logged this requirement in our feature request. We will get this feature implemented in our future release.

Please let us know if you have any other questions.

Regards
Rajendran


CZ Chaouki Zaouia February 9, 2010 02:30 PM UTC

What about the table text direction (Rotate text on the table)


CZ Chaouki Zaouia February 9, 2010 04:30 PM UTC

the problem is solved


RA Rajendran Syncfusion Team February 10, 2010 09:43 AM UTC

Hi Chaouki,

Thank you for your update.

We are glad that the issue has been solved.

Please let us know if you have any other questions.

Regards,
Rajendran


SA Santi A replied to Chaouki Zaouia December 4, 2020 11:57 AM UTC

the problem is solved

Hi Chaouki hope you are doing fine.

Could you please share how did you solve text direction in table cell (Rotate text on the table)?

Thanks in advance for sharing,

Santi.


HC Hemalatha Chiranjeevulu Syncfusion Team December 7, 2020 12:34 PM UTC

Hi Santi,

From the given details, we have found that your requirement is change the text direction in the table cell. We suggest you to use the below code snippet in your Sample Application to meet you requirement

Please find the below code snippet to change the text direction in the table cell.
 
//Creates an instance of WordDocument class
WordDocument document = new WordDocument();
document.Open("Table.docx", FormatType.Docx);
WSection section = document.Sections[0];
WTable table = section.Tables[0] as WTable;
//Accesses the instance of the first row in the table
WTableRow row = table.Rows[0];
//Specifies the row height
row.Height = 20;
//Specifies the row height type
row.HeightType = TableRowHeightType.AtLeast;
//Accesses the instance of the first cell in the row
WTableCell cell = row.Cells[0];
//Specifies the cell back ground color
cell.CellFormat.BackColor = Color.FromArgb(192, 192, 192);
//Specifies the same padding as table option as false to preserve current cell padding
cell.CellFormat.SamePaddingsAsTable = false;
//Specifies the left, right, top and bottom padding of the cell
cell.CellFormat.Paddings.Left = 5;
cell.CellFormat.Paddings.Right = 5;
cell.CellFormat.Paddings.Top = 5;
cell.CellFormat.Paddings.Bottom = 5;
//Specifies the vertical alignment of content of text
cell.CellFormat.VerticalAlignment = VerticalAlignment.Middle;
//Disables the text wrap option to avoid displaying longer text on multiple lines
cell.CellFormat.TextWrap = false;
//Sets text direction for cell
cell.CellFormat.TextDirection = TextDirection.VerticalBottomToTop;
//Saves and closes the document instance
document.Save("TableCellFormatting.docx", FormatType.Docx);
document.Close();
 

Please let us know if you have any other questions.

Regards,
Hemalatha C


Loader.
Live Chat Icon For mobile
Up arrow icon