Document changed in Design mode problem

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Greg Shaffer - Boulder
Avatar
Hi Again,

Is there any way to be informed when the document changes for a code editor? If not, is it possible to make the Document virtual or add an event?

Thanks,
Greg

Some background...

I have a syntax editor where I set the document's language and look-and-feel in the constructor of the document. I do this in the constructor instead of in the designer because the language is static, and the designer doesn't help with that problem.

This works great, until I copy the syntax editor in VisualStudio design mode. In the InitializeComponent code for the copied syntax editor, the designer now thinks it needs to create a new document because I originally placed code in the codeeditor's constuctor.

This causes problems during runtime because the document has changed. This causes the language definition to be lost, etc...

So, it would be nice for my situation to be able to override "Document" in the syntax editor, or to be informed when the "Document" reference has changed.

In my case, if / when the document changes, I want to force the document to use my settings.

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
So are you asking for a DocumentChanged event on the SyntaxEditor control?


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.