I get an Error "File Format is not valid" when I append RTF to a richtextbox
public void Go()
{
rtb.Text = "Activated Partial Thromboplastin Time : Collected: 8/17/2012 9:06:00 AM\n";
rtb.Select(rtb.TextLength, 0);//sets the selection starting point as the end of this Rtb
rtb.SelectedRtf = @"{\trowd" +//ERROR thrown here
@"\cellx4000" +
@"\cellx9500" +
@"\intbl Activated Partial Thromboplastin Time\cell" +
@"\intbl 34.8 Seconds\cell" +
@"\row}";
}
How can I append a trowd to my RichTextBox?
To insert your rtf code, it has to be a fully independent rtf document, which means you need the
\rtf1{header and a closing}symbol to your text:Do note the beginning of the string and also the extra
}bracket at the end.