Disabling Child language

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Dan Oren - Software Developer, Watchfire
Version: 4.0.0234
Avatar
Hey,

I am using the SyntaxEditor with a couple of Languages.
The main language is HTML and it has Child languages such as VBScript, JavaScript and more.
I would like to enable the user to select which of the languages is "Working" :
The user will able to choose from the right click menu whether to parse the VBScript that found in the HTML page. (In RunTime...).

How can I implement this ? Hwo can I disable or enable a Child language ? I dont want to remove it, but only disable it....

10'X
Dan Oren

Dan Oren

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry but I'm not quite sure what you mean by disabling a language. Could you be more specific on what you mean by that?

You could always swap the PlainText language in for a child language if it's disabled so that there is no highlighting. Does that help?


Actipro Software Support

Posted 13 years ago by Dan Oren - Software Developer, Watchfire
Avatar
Yes, I want to show a plain text for java script parsing for example while VBScript is still seen like a language.

If the user has an HTML page that in the background has the HTML language and its nested languages such as VBScript, ASP.Net, JavaScript, CSS etc' I want to allow the user to select from the menu which prsing is activated for the document. He may remove the ASP.Net for example.

Dan

Dan Oren

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
In that case you'd have to set the root language's IsUpdating to true, swap in PlainText for whatever language is being "disabled" and then set the root language's IsUpdating property back to false.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.