Thank You!
I disabled usage of the SCide.IniLexer class and this code works fine with the built-in lexer:
I disabled usage of the SCide.IniLexer class and this code works fine with the built-in lexer:
public static class ScintillaConstants
{
public const int SCE_PROPS_DEFAULT = 0;
public const int SCE_PROPS_COMMENT = 1;
public const int SCE_PROPS_SECTION = 2;
public const int SCE_PROPS_ASSIGNMENT = 3;
public const int SCE_PROPS_DEFVAL = 4;
public const int SCE_PROPS_KEY = 5;
}
// ...
// (here editor is instance of the Scintilla editor component)
editor.Lexing.Lexer = ScintillaNET.Lexer.Properties;
editor.Styles[ScintillaConstants.SCE_PROPS_KEY].ForeColor = Color.FromArgb(0, 0, 153);
editor.Styles[ScintillaConstants.SCE_PROPS_ASSIGNMENT].ForeColor = Color.OrangeRed;
editor.Styles[ScintillaConstants.SCE_PROPS_DEFVAL].ForeColor = Color.FromArgb(102, 0, 102);
editor.Styles[ScintillaConstants.SCE_PROPS_COMMENT].ForeColor = Color.DarkGreen; // Color.FromArgb(102, 102, 102);
editor.Styles[ScintillaConstants.SCE_PROPS_SECTION].ForeColor = Color.DarkRed; // Color.FromArgb(0, 0, 102);
editor.Styles[ScintillaConstants.SCE_PROPS_SECTION].Bold = true;
The only drawback is that the native "Properties" lexer has no "quoted style" defined :(