This is a migrated thread and some comments may be shown as answers.

Horizontal alignment not working for table cells in RichTextBox

3 Answers 166 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 22 May 2011, 05:55 PM
Hello,

I'm seeing an issue with the RadRichTextBox (version 2011.1.315.1040). I'm currently unable to get text to render with different alignments when placed inside a table.  I'm specifically trying to center the text horizontally.

Steps to reproduce the issue:
1) Create a new RadControls Silverlight Application
2) Add a RichTextBox to the page
3) Add a button to the page
4) Wire up the button to show the InsertTableDialog
5) Run the app
6) Insert a table into the RichTextBox
7) Type some text into one of the table cells
8) From the context menu attempt to align the text centered horizontally.

May specific scenario is in rendering an imported Html document that uses tables to center text, but this seems to reproduce the issue I'm seeing. Could someone please point out what I may be doing wrong or confirm that this is indeed an issue?

Thanks a lot,
Jerry

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 26 May 2011, 12:45 PM
Hello Jerry,

There is indeed a glitch with the way horizontal alignment works for table cells in flow layout mode. We have not been able to reproduce the issue in paged layout mode. Can you confirm that this is the case in your application? We will do our best to fix this in the next release - the Q2 or the Q2 Beta.
On a side note, centering table document elements is currently not supported. 
If you are using tables only to center the text and don't need tables in the document for any other reason, have you considered using paragraphs and setting their alignment (you can do that from the paragraph tab in the ribbon)? There doesn't seem to be an issue with the centering of paragraphs in all layout modes.

All the best,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jerry
Top achievements
Rank 1
answered on 27 May 2011, 02:28 PM
Hi Iva,

Yes, it's indeed the case that the cell alignment works in Paged Layout Mode.

Thanks for pointing that out along with the functionality around paragraphs - we may be able to adjust how we generate the HTML to better accomodate rendering it in the RichTextBox...

Thanks!
Jerry
0
Iva Toteva
Telerik team
answered on 01 Jun 2011, 07:45 AM
Hi Jerry,

No thanks needed.
You can use some of the demos, e.g. the data binding one to create a document similar to the one you wish to have and see the HTML output in the lower right TextBox.

All the best,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Jerry
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Jerry
Top achievements
Rank 1
Share this question
or