我正在使用TX TextEditingControl (免费版),我认为这绝对是好的。
但我似乎无法获得我需要的RTF(文本)内容。
//Define
private TXTextControl.TextControl rtf = new TXTextControl.TextControl();
[...code...]
private void button_Click(object sender, EventArgs e) {..
//rtf.Save(s, TXTextControl.StreamType.RichTextFormat);
//This is what I would like to do but I cant find the property or function that does this.
string s = rtf.DocumentRTF;
//Im expecting the standard RTF Format but I get blank
MessageBox.Show(s);
}
答案 0 :(得分:0)
string s = "";
rtf.Selection.Bold = true;
//rtf.Selection.Save(TXTextControl.StreamType.RichTextFormat);
rtf.Save(out s,TXTextControl.StringStreamType.RichTextFormat);
MessageBox.Show(s);
答案 1 :(得分:0)
亲爱的使用以下
for Vb.Net
Dim RegFont As New Font("Arial", UseFontSize, FontStyle.Bold)
Dim VIPFont As New Font("Arial", UseFontSize, FontStyle.Bold)
MyRitchText.SelectionFont = VIPFont
MyRitchText.SelectionAlignment = HorizontalAlignment.Center
MyRitchText.SelectionColor = Color.Green
表示c#
Font RegFont = new Font("Arial", UseFontSize, FontStyle.Bold);
Font VIPFont = new Font("Arial", UseFontSize, FontStyle.Bold);
MyRitchText.SelectionFont = VIPFont;
MyRitchText.SelectionAlignment = HorizontalAlignment.Center;
MyRitchText.SelectionColor = Color.Green;
谢谢:D