Proper way to Clear() the text?

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Douglas Peterson
Version: 4.0.0270
Avatar
What's the 'proper' way to clear the text in the SyntaxEditor?

I've been using SyntaxEditor.Text = String.Empty;

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That works fine (it's a wrapper for SyntaxEditor.Document.Text) and is easiest. It will wipe out the undo stack too.

If you wish to keep the undo stack in tact, use SyntaxEditor.Document.ReplaceText and pass it the range of the document as the range to replace.


Actipro Software Support

The latest build of this product (v2018.1 build 0342) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.