We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Turning On/Off Syntax Highlighting

Thread ID:

Created:

Updated:

Platform:

Replies:

55384 Jan 29,2007 06:14 PM UTC Jan 30,2007 01:20 AM UTC Windows Forms 2
loading
Tags: EditControl
John Couture
Asked On January 29, 2007 06:14 PM UTC

Is there a way to turn on/off the syntax highlighting programmatically?

I'm writing an app that switches between HTML code view and plain text view and back, and I need to be able to view the plain text without syntax highlighting and then view the HTML code with syntax highlighting.

Any Info you can provide will be appreciated.

John.
[VB.NET 2005 & Syncfusion.Edit.Windows v.4.402.0.51]

John Couture
Replied On January 29, 2007 08:30 PM UTC

As additional info...

I'm using the ApplyConfiguration method of the control to set the syntax highlighting. If I'm viewing plain text, I use:

EditControl1.ApplyConfiguration(KnownLanguages.Text)

If I'm viewing HTML code, I use:

EditControl1.ApplyConfiguration(KnownLanguages.HTML)

One problem I'm encountering is that any numbers that show up in the text (e.g. Account 1234) have a color applied to them when in "Plain Text" mode. In the example: "Account 1234", the 1234 is showing up in a dark blue color. I don't want any text coloring when KnownLanguages.Text is applied.

Again, thanks for any information you can provide.

John
[VB.NET 2005 & Syncfusion.Edit.Windows v.4.402.0.51]



Administrator [Syncfusion]
Replied On January 30, 2007 01:20 AM UTC

Hi John,

It is possible to turn on/off the syntax highlighting programmatically. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thanks for your patience.

Regards,
Ebenezer.P

sample

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;