Articles in this section
Category / Section

How to set custom indicators to denote white spaces in WinForms SyntaxEditor (EditControl)?

1 min read

Space indicator character

You could set custom indicators for white spaces by using the EditControl's NewLineString, TabString and SpaceChar sub-properties of the WhiteSpaceIndicators property as shown in code below.


this.editControl1.WhiteSpaceIndicators.NewLineString = "LF";
this.editControl1.WhiteSpaceIndicators.TabString = "TAB";
this.editControl1.WhiteSpaceIndicators.SpaceChar = "s";



Me.editControl1.WhiteSpaceIndicators.NewLineString = "LF"
Me.editControl1.WhiteSpaceIndicators.TabString = "TAB"
Me.editControl1.WhiteSpaceIndicators.SpaceChar = "s"



The EditControl's ShowWhiteSpaces property has to be set to true for this purpose.


Reference link:

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment