views:

232

answers:

1

I have a PyShell, which is supposed to be derived from wx.stc.StyledTextCtrl. How do I change the color scheme it uses?

A: 

You can use styledTextCtrl.StyleSetSpec(wx.stc.STC_STYLE_INDENTGUIDE, "fore:#CDCDCD") (Bunch of .StyleSetSpec properties) ... ... ... styCtrl.SetCaretForeground("BLUE") styCtrl.SetSelBackground(True, wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHT)) styCtrl.SetSelForeground(True, wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)) ... (Bunch of Set*() commands)

Don't know if there is a way to load a pre-defined color scheme. You could define it in YAML and load it up via the commands above and more.

jhaukur
Also, check Yellowbrain's guide: http://www.yellowbrain.com/stc/styling.html
jhaukur