0

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);

}
4

2 に答える 2

0

それを見つけた!RTF プロパティはありません。出力を取得するには、save() 関数を使用する必要があります。幸いなことに、ストリームと文字列に書き込むことができます。

       string s = "";

        rtf.Selection.Bold = true;

        //rtf.Selection.Save(TXTextControl.StreamType.RichTextFormat);

        rtf.Save(out s,TXTextControl.StringStreamType.RichTextFormat);

        MessageBox.Show(s);
于 2014-02-16T09:54:53.417 に答える
0

親愛なる次の使用

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;

ありがとう

于 2014-02-16T10:07:13.160 に答える