RichTextBox control vs. MS Word

P

Philip J. fry

Hi All!

I have a very simple Rich Text File which displays
differently in RichTextBox control [loaded by LoadFile
("test.rtf", RichTextBoxStreamType.RichText)], and MS
Word. Is it possible to get the same appearance as in MS
Word?

In the case that someone would like to try, I put the
content of test.rtf at the bottom of this message. MS
Word displays it as a table with two rows and one column.
The second row is three times wider than the first one.
In the RichTextBox control, second row is as wide as the
first one, i.e., the text inside the table is not
formatted properly (it goes out of the bottom cell.

Any help would be greatly appreciated,
Phil

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0
\froman\fprq2\fcharset0 Times New Roman;}{\f1
\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\trowd\trgaph108\trleft-108
\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10
\trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10
\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15
\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs
\cellx720\pard\intbl\f0\fs24 A\cell\row
\intbl AAAAAAAAA\cell\row
\pard\f1\fs17\par
}
 
P

Philip J. fry

To simplify the problem:

There is a cell, within the table, whose content is wider
than the cell width. Word(Pad) increases the row height
so that the whole content of the cell can fit in.
RichTextBox control does not increase the row height, and
the content goes out of cell.

Word(Pad):

+---+
| A |
+---+
|AAA|
|AAA|
|AAA|
+---+

RichTextBox control:

+---+
| A |
+---+
|AAA|AAAAAA
+---+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top