SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

can't change backgroundcolor

Last post 08-21-2017 12:13 AM by Puffeltje. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-16-2017 6:02 PM

    can't change backgroundcolor

    I am trying to use ICSharpCode.TextEditor in Visual Basic 2010. I know that the support is mostly for C# but i hope someone can help me.


    I use the following code to set forcolor and backgroundcolor for tabs and spaces, but only the textcolor is changing. Am i doing something wrong? Can somebody show me how it is done the right way?


    Dim colorTab As Color = Color.Red
    Dim backgroundcolorTab As Color = Color.Green
    Dim colorSpace As Color = Color.Blue
    Dim backgroundcolorSpace As Color = Color.Yellow
    Dim highlightcolortab As HighlightColor = New HighlightColor(colorTab, backgroundcolorTab, TrueFalse)
    Dim highlightcolorspace As HighlightBackground = New HighlightBackground(colorspace, backgroundcolorspace, TrueFalse)
    Dim highlightstrategy As DefaultHighlightingStrategy = tec1.Document.HighlightingStrategy
    highlightstrategy.SetColorFor("TabMarkers", highlightcolortab)
    highlightstrategy.SetColorFor("SpaceMarkers", highlightcolorspace)
    As you can see i tried both methodes (HighLightColor and HighLightBackground) but both don't set the backgroundcolor.
  • 08-17-2017 5:46 PM In reply to

    Re: can't change backgroundcolor

    i think i don't doing anything wrong: in all the xshd files there is only  the textcolor defined, never a backgroundcolor.

  • 08-21-2017 12:13 AM In reply to

    Re: can't change backgroundcolor

    when i use

    highlightstrategy.SetColorFor("Default", highlightcolortab)


    all the text is getting the right forecolor and backcolor except the numers. The digits all keep the black forecolor

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this ( email address.