Posted 17 years ago by Cyril Dudarenko - National Risk Services, Inc
Version: 4.0.0246
Avatar
Hello.
I have a problem with document modification. I try to change SyntaxEditor.Text property programmatically, and I need to produce change of undo stack.

Please, look at the code below:

public void SetText(string text)
{
   syntaxEditor.Text = syntaxEditor.Document.Text = text;
}
But after that DocumentUndoRedoStateChanged event not fires and Document.Modified property is false.

Please, answer how can I make this task?

Comments (2)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Cyril,

Setting the Text property assumes you are wiping out the document and its undo history. If you wish to replace all the text and keep the undo stack, use Document.ReplaceText and specify the entire document range to be replaced.


Actipro Software Support

Posted 17 years ago by Cyril Dudarenko - National Risk Services, Inc
Avatar
Hello!
Thanks, for fast reply, all works fine!!
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.