1
我得到一個錯誤"File Format is not valid"
當我追加RTF到richtextbox
如何附加trow到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}";
}
我怎麼能追加trowd
我的RichTextBox?
因此,不可能將RTF附加到文本?我只能替換整個內容。 –
@ P.Brian.Mackey不知道我關注。我修改了代碼以使其工作 - 它在rtf文檔的末尾插入表格行。 SelectedRtf屬性要求該值是一個有效的rtf實體,它需要'{\ rtf1 \ ansi}'格式。所以不,你不能取代整個內容,只是SelectedRtf部分。 – LarsTech
我的錯誤,謝謝澄清。 –