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

Which version of RTF standard does the RadRichTextBox support?

1 Answer 129 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Aggie
Top achievements
Rank 1
Aggie asked on 07 Apr 2011, 11:42 PM
Hello,

I'm trying to find out which version of the RTF standard the RadRichTextBox supports? I'm trying to set column widths in a table and while the document displays correctly in Word it does not look correct in RadRichTextBox. Using code like below to set column width to 20% of the table width:
\clftsWidth2\clwWidth1000\cellx1

Additionally, specifying absolute cell width like \cellx1234 produces an exception in RadRichTextBox "ColumnSpan must be at least 1".
Is there any way to format tables correctly inside RadRichTextBox? I don't mind specifying absolute sizes as long as they are displayed correctly!

Cheers,
Aggie


1 Answer, 1 is accepted

Sort by
0
Alex
Telerik team
answered on 13 Apr 2011, 01:35 PM
Hi Aggie,

The RTF support for the RadRichTextBox is being developed according to RTF v.1.9.1 specification (you can download it from here). 

As for specifying cell widths - your approach by using the \clftsWidth and \clwWidth control words is correct. However the \cellx control word cannot be omitted as it marks the end of cell definition. Also note that according to the RTF the specification cellx defines the right boundary of a table cell. So it is not only the width of the individual cell but the sum of that with and the widths of all the cells before it. In the case when an explicit cell width is specified (using the \clftsWidth and \clwWidth control words) the actual values of the \cellx tags are ignored, but still these values must be in increasing order otherwise you will probably get the "ColumnSpan must be at least 1" exception. 

To make thing clearer here is a short example of a table with two columns 40% and 60% of the width:

\pard\intbl\itap1 first cell\cell\pard\intbl\itap1 second cell\cell\trowd\irow0\trgaph0\clftsWidth2\clwWidth2000\cellx2000\clftsWidth2\clwWidth3000\cellx5000\row

Please don't hesitate to contact us again if you have more questions.

Regards,
Alex
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
Aggie
Top achievements
Rank 1
Answers by
Alex
Telerik team
Share this question
or