How to clear text content in RichTextBox

前端 未结 6 705
眼角桃花
眼角桃花 2020-12-15 02:53

After getting the text in the RichTextBox I want to clear the text. How can I do that?

TextRange txt = new TextRange(richtxtSNotice.Document.ContentStart, ri         


        
6条回答
  •  时光取名叫无心
    2020-12-15 03:18

    To clear all content of richtext box you can use the following code

    richTextBox1->SelectAll();
    richTextBox1->Clear();
    

提交回复
热议问题