wxPython:更改wx.stc.StyledTextCtrl的颜色方案
我有一个PyShell,它应该是从wxPython:更改wx.stc.StyledTextCtrl的颜色方案,python,user-interface,wxpython,color-scheme,Python,User Interface,Wxpython,Color Scheme,我有一个PyShell,它应该是从wx.stc.StyledTextCtrl派生的。如何更改当前使用的配色方案?您可以使用 styledTextCtrl.StyleSetSpec(wx.stc.stc_STYLE_INDENTGUIDE,“fore:#CDCDCD”) (一组.StyleSetSpec属性) ... ... ... styCtrl.SetCaretForeground(“蓝色”) styCtrl.SetSelBackground(True,wx.SystemSettings\u
wx.stc.StyledTextCtrl
派生的。如何更改当前使用的配色方案?您可以使用
styledTextCtrl.StyleSetSpec(wx.stc.stc_STYLE_INDENTGUIDE,“fore:#CDCDCD”)
(一组.StyleSetSpec属性)
...
...
...
styCtrl.SetCaretForeground(“蓝色”)
styCtrl.SetSelBackground(True,wx.SystemSettings\u getcolor(wx.SYS\u color\u HIGHLIGHT))
styCtrl.SetSelForeground(True,wx.SystemSettings\u getcolor(wx.SYS\u color\u HIGHLIGHTTEXT))
...
(一组Set*()命令)
不知道是否有办法加载预定义的配色方案。
您可以在YAML中定义它,并通过上面的命令和更多命令加载它