CUSTOMISE THE SYNTAX HIGHLIGHTING FONT COLORS

What's best way to create a custom style? Changing backcolor, font colors for syntax highilghter?
Hi,
You can either drop Parser component on the form (in case of WinForms application), and edit its Scheme property. All font styles can be found under Styles collection.
Alternatively, you can customize lex style by setting font color/style at run-time:

parser.Scheme.Styles[1].ForeColor = System.Drawing.Color.Red; // numbers

Let me know if it helps.

Regards,
Dmitry
Thanks Dmitry,
I can't see any Scheme in the Designer. The Scheme drop down shows "none".
If I would change in program instead of designer. As per your example, ForeColor would change the basic font color. How would I as an example, change the blue font in below example?
class Program
I figured it out.. thanks Dmitry
I can't find in documentation details about the items, do you have anything?
[index of element] = [style of numbers]

Thanks.
Hi,

If you're using one of SyntaxParser descendants, here's how collection of styles will look like
identifiers (0)
numbers (1)
reswords (2)
comments (3)
xml coments (4)
symbols (5)
white spaces (6)
strings (7)
directives (8)
html params (9)
syntax errors (10)
code snippets (11)
If you're using generic parser that loads syntax scheme from xml file, you could look at Styles collection there,which will look like this:











Regards,
Dmitry
That did the trick Dmitry, thanks.

I made a dark theme with this now. But the "intellisense", code snippets, scrollbars, etc are all still light colored. How can I individually or globally change all those elements?
I tried this.textEditor.VisualThemeType = Alternet.Editor.VisualThemeType.Dark;

to Use Dark base and then do changes you recommended, but when applying VisualThemeType, then none of parser.scheme.styles are applied.

Is there maybe an XML for VisualThemeType.Dark or Custom that I can configure or do you recommend something else?
Just to clarify, when i say "light colored" i mean the background of these controls are light and i need to make it dark, the forecolor seems to get applied on most of these controls though.
How can I change the backcolor of all these popup controls, searchboxes, code completion/intellisense controls, etc?
Hi,
It is not entirely clear what code you are using to set the desired color.
Could you please refer to the CodeEditor demo, "Visual Themes" page which illustrates switching between light and dark color themes?
Also you can look into "Customize" quick start demo, which allows you to switch between color themes in the Customize Dialog.
If the demos I mentioned will not help you achieve the desired results, could you please send us a code sample which shows the problem to support@alternetsoft.com