Proper way to Clear() the text?

SyntaxEditor for Windows Forms Forum

Posted 14 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 14 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 (v21.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.