Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Answering my own question here, but only due to the help from Joel and sylverdrag...</p> <p>The short answer is that both the .Net and underlying COM RichTextBox do not support word wrap in tables. I ended up knocking up a test application and using both the COM and .Net RichTextBox controls and they both exhibited the same (broken) behaviour.</p> <p>I also downloaded the RTF spec from the link supplied by sylverdrag and after tinkering with hand-made RTF documents in MS Word and RichTextEdit controls, I can confirm that TichTextBox does not correctly support the \intbl control word - which is required for word wrap in tables.</p> <p>There appear to be three possible solutions:</p> <ol> <li><p>Use <a href="http://www.textcontrol.com/products/client_side/dotnet/features/" rel="nofollow noreferrer">TX Text Control</a>. I have confirmed this works using a trial version but it is expensive - prices start at US$549 per developer.</p></li> <li><p>Use an embedded MS Word instance as discussed on <a href="http://www.codeproject.com/KB/miscctrl/winwordcontrol.aspx?msg=2911786" rel="nofollow noreferrer">Code Project</a>. Note that the code example provided on Code Project didn't work out of the box but I did get it working with Office 2003 &amp; VS 2008. After much mucking around we hit an unexpected show stopper - we want the document to be read-only so we Protect() the document. While this works, when a user tries to edit the document the MS Word "Protect Document" side bar pops out from the right hand side of the control. We can't live with this and I was not able to turn it off (and from googling it looks like I'm not alone).</p></li> <li><p>Give up on RTF and use HTML instead and then render the document in a WebBrowser control instead of a RichTextEdit control. That is the option we are taking as it turns out the source document is available in either format.</p></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload