StyledTextCtrl - Modifying the Fold Margin Background Color

Hello,

I was wondering if there was a way to modify the background color for the margin if I have enabled folding in it. I cannot seem to change the color without disabling folding and was wondering if it was possible. I have line numbers set up in margin 1.

self.SetMargins(0,0)
self.SetMarginType(1,stc.STC_MARGIN_NUMBER)

If I enable folding with this statement, the margin is always white
self.SetMarginMask(2,stc.STC_MASK_FOLDERS)

I was able to override the color with the next statement but this turns off the folding.
self.SetMarginMask(2,0)

Thank you
Scott

Hello,

ยทยทยท

On Tue, Dec 9, 2008 at 9:23 AM, Scott Hall smhall316@gmail.com wrote:

Hello,

I was wondering if there was a way to modify the background color for the margin if I have enabled folding in it. I cannot seem to change the color without disabling folding and was wondering if it was possible. I have line numbers set up in margin 1.

self.SetMargins(0,0)
self.SetMarginType(1,stc.STC_MARGIN_NUMBER)

If I enable folding with this statement, the margin is always white
self.SetMarginMask(2,stc.STC_MASK_FOLDERS)

I was able to override the color with the next statement but this turns off the folding.

self.SetMarginMask(2,0)

Yes, you can change the colors at anytime.

  1. When you do MarkerDefine to define the fold markers you set a fore/back ground color for the markers.

  2. There are two other methods for setting the rest of the margins color.

SetFoldMarginHiColour(True, color)

SetFoldMarginColour(True, color)

Cody