Reusing a SyntaxLanguage

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Jeff Key
Avatar
I'm using the SyntaxEditor as a textbox in several forms in a MMC-like app. All of the instances use the same syntax, so I'd like to create the SyntaxLanguage once at startup and reuse it. Nothing in the docs state that this isn't possible, so I'd just like to confirm that there aren't any gotchas. (I'm not sure if the SyntaxLanguage maintains any state that may make this undesirable.)

Similarly: Can two instances of an editor share the same SyntaxLanguage? Some of the forms pop up an additional form with a SyntaxEditor and I'd like to reuse it as well.

Thanks!

Comments (2)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes that is possible and highly recommended! It will really cut down on memory usage if you do that. It is a technique that needs to be added to the docs.


Actipro Software Support

Posted 20 years ago by Jeff Key
Avatar
Great, thanks.
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.