Proper way to Clear() the text?

SyntaxEditor for Windows Forms Forum

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

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

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
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 (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.