Setting background color of a symbol margin

509 views
Skip to first unread message

Paul K

unread,
Jul 17, 2013, 2:22:59 PM7/17/13
to scintilla...@googlegroups.com
Hi All,
 
I have three margins (line number, symbol, and folds). Whenever I set the background color of the line number margin, it also changes the color of the symbol margin: editor:StyleSetBackground(wxstc.wxSTC_STYLE_LINENUMBER, wx.wxColour(0, 255, 0)). I don't see a separate style for symbol margins.
 
How do I set different background colors for line number and symbol margins? Am I missing something obvious? Thank you.
 
Paul.

Neil Hodgson

unread,
Jul 17, 2013, 8:14:31 PM7/17/13
to scintilla...@googlegroups.com
Paul K:

> I have three margins (line number, symbol, and folds). Whenever I set the background color of the line number margin, it also changes the color of the symbol margin: editor:StyleSetBackground(wxstc.wxSTC_STYLE_LINENUMBER, wx.wxColour(0, 255, 0)). I don't see a separate style for symbol margins.

There is no separate style for symbol margins.

> How do I set different background colors for line number and symbol margins? Am I missing something obvious?

You can choose SC_MARGIN_BACK or SC_MARGIN_FORE to use colours from STYLE_DEFAULT.

Neil

Paul K

unread,
Jul 18, 2013, 5:04:32 PM7/18/13
to scintilla...@googlegroups.com, nyama...@me.com
Neil:
 
>> How do I set different background colors for line number and symbol margins? Am I missing something obvious?

> You can choose SC_MARGIN_BACK or SC_MARGIN_FORE to use colours from STYLE_DEFAULT.
Yes, I can use SetMarginType(1, wxstc.wxSTC_MARGIN_BACK) to set it to the color from STYLE_DEFAULT, but it seems like I can't set it to anything else.
 
So, just to confirm there doesn't seem to be a way to set symbol margin background to a color that doesn't match linenumber background OR current STYLE_DEFAULT background.
 
Paul.
 
Reply all
Reply to author
Forward
0 new messages