How to Clear content in RichEditControl
By FoxLearn 8/30/2024 2:44:32 AM 27
If you're working with RichEditControl from DevExpress in a C# WinForms application, you can clear its content in a straightforward way.
How to clear content in RichEditControl
Depending on your specific needs, you might use other methods.
You can clear Text Using RichEditControl.Text
Property as shown below.
richEditControl1.Text = string.Empty;
Clearing Content in RichEditControl
(DevExpress)
To clear the content of a RichEditControl
, You can invoke the RichEditControl.Document.Delete
method as shown below.
// Assuming richEditControl1 is your RichEditControl richEditControl1.Document.Delete(richEditControl1.Document.Range);
This approach results in clearing a current document content only.
If you want to clear the content of a RichEditControl
while also removing all custom styles, you can use the CreateNewDocument
method.
// Reset the document, clearing content and removing custom styles richEditControl1.CreateNewDocument();
- How to use CheckedComboBoxEdit with SearchControl in C#
- How to Create a Radial Menu in C#
- How to Create a Fluent Design Form in C#
- DevExpress: Components Project Converter
- DevExpress: Download & Install
- DevExpress: Ribbon Control in C#
- DevExpress: Splash Screen Manager in C#
- DevExpress: Splash Screen in C#
Categories
Popular Posts
How to Download Chromedriver for Selenium
08/29/2024
C# Tutorial
07/20/2024
How to Download Microsoft SQL Server
06/22/2024
What is ECC RAM?
04/09/2024