View Whitespace - jacobslusser/ScintillaNET GitHub Wiki
Scintilla has several properties for controlling the display and color of whitespace (space and tab characters). By default, whitespace is not visible. It can be made visible by setting the ViewWhitespace
property. Since whitespace can be significant to some programming languages the default behavior is for the current lexer to set the color of whitespace. To override the default behavior the SetWhitespaceForeColor
and SetWhitespaceBackColor
methods can be used. To make whitespace visible and always display in an orange color (regardless of the current lexer), try:
// Display whitespace in orange
scintilla.WhitespaceSize = 2;
scintilla.ViewWhitespace = WhitespaceMode.VisibleAlways;
scintilla.SetWhitespaceForeColor(true, Color.Orange);