Can we set colors for elements such as Line Numbers?

SyntaxEditor for Windows Forms Forum

Posted 7 years ago by Mike Dempsey - Sr. Developer, Teradata Corp
Version: 12.1.0302
Avatar

I am building a Visual Studio exennsion project that will use Syntax Editor instead of Visual Studio's own editor. I am trying to integrate it as closely as possible and have already set all the Language Styles using colors from Visual Studio's option preferences.

I am now trying to set the colors for the elements that are outside the main text area but have not been able to find properties to do this.

The areas I am looking for are:
    Line Numbers             (Fore and Back)
    Indicator Margin         (Back only)
    Collapsed Text            (Fore and Back)
    Brace match highlight  (Back only)

Are there properties available to control these colors?    

Thanks
Mike

Comments (3)

Posted 7 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Line numbers and indicator margin are modified in the renderer. You might need to cast the object to VisualStudio2005SyntaxEditorRenderer.

For the brace matching you need to add a highlighting style to your language that uses "BracketHighlightingStyle" as key.


Best regards, Tobias Lingemann.

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

Yes, Tobias is right.

BracketHighlightingStyle and CollapsibleTextStyle are special highlighting style keys that when registered will alter those areas.  You can see the ActiproSoftware.CSharp.xml file for a sample of those.

The line and indicator margin colors can be set via the renderer tied to SyntaxEditor.  If you cast SyntaxEditor.RenderResolved to a VisualStudio2005SyntaxEditorRenderer, you can set them on there.  For instance, the IndicatorMarginBackgroundFill property.


Actipro Software Support

Posted 7 years ago by Mike Dempsey - Sr. Developer, Teradata Corp
Avatar

Thanks

The latest build of this product (v2018.1 build 0342) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.