VisualStudio2005SyntaxEditorRenderer for styling Line Number Margin.

SyntaxEditor for Windows Forms Forum

Posted 3 years ago by roberto baruffa
Version: 21.1.1
Avatar

Hi,

 I'm trying to upgrade Winforms SyntaxEditor from version 14 to the latest version (21).

I can't find visualStudio2005SyntaxEditorRenderer for styling LineNumberMargin. 

My old code was:

visualStudio2005SyntaxEditorRenderer1.LineNumberMarginBackgroundFill = new ActiproSoftware.Drawing.SolidColorBackgroundFill(System.Drawing.Color.White);

visualStudio2005SyntaxEditorRenderer1.LineNumberMarginBorderColor = System.Drawing.Color.Silver;

visualStudio2005SyntaxEditorRenderer1.LineNumberMarginBorderDashStyle = System.Drawing.Drawing2D.DashStyle.Solid;

visualStudio2005SyntaxEditorRenderer1.LineNumberMarginDisabledBackgroundFill = new ActiproSoftware.Drawing.SolidColorBackgroundFill(System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(239))))));

visualStudio2005SyntaxEditorRenderer1.LineNumberMarginForeColor = System.Drawing.Color.Silver;

this.syntaxEditor.Renderer = visualStudio2005SyntaxEditorRenderer1;

Please, can You tell me what is the best way to do that with the new release?

Comments (1)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Roberto,

The line number margin is now rendered using a special LineNumbers classification type associated with a highlighting style as described in this topic.  It now works just like Visual Studio where the editor's appearance can be customized by end users in the same place they customize things like the keyword forecolor, etc.  You can see how this works in our Highlighting Style Views QuickStart.

By adjusting the highlighting style for that LineNumbers classification type, you can change the foreground/background of the line number margin.  However please note that it no longer renders a border.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.