How to change Pythonwin background colour? - Thank you

rhys rhystucker at rhystucker.fsnet.co.uk
Thu Jun 7 01:40:42 EDT 2001


Mark Hammond wrote:
> 
> rhys wrote:
> 
> > This is a real problem for me as I have a sensitivity to bright light.
> > I've downloaded the Pythonwin source - is it just a matter of finding
> > white_brush or something similar, changing it and recompiling?
> 
> Open pywin.framework.interact
> 
> Find the following function:
> 
>         def SetStyles(self):
>                 FormatterParent.SetStyles(self)
>                 Style = pywin.scintilla.formatter.Style
> 
> You can add a 3rd param to the "Style()" function.  This is an RGB value
> for the background.  Eg:
> 
> self.RegisterStyle( Style(STYLE_INTERACTIVE_EOL,
> STYLE_INTERACTIVE_PROMPT, 8421504 ) )
> self.RegisterStyle( Style(STYLE_INTERACTIVE_PROMPT, formatInput, 8421504 ) )
> 
> etc - note the 3rd param I added - this is win32api.RGB(128,128,128),
> and gives a pretty horrible grey as the background color.  Add it to all
> or any of the Style() calls you like.
> 
> If you want to generalize this somehow so the value is read from the
> registry I would be happy to include if.  I may even get around to
> adding it to the dialog so it can be specified.
> 
> Mark.

Thank you.

rhys



More information about the Python-list mailing list