[英]wxPython: Changing the color scheme of a wx.stc.StyledTextCtrl
我有一个PyShell,应该从wx.stc.StyledTextCtrl
派生。 如何更改当前使用的配色方案?
您可以使用styledTextCtrl.StyleSetSpec(wx.stc.STC_STYLE_INDENTGUIDE,“ fore:#CDCDCD”)(一系列.StyleSetSpec属性)... ... styCtrl.SetCaretForeground(“ BLUE”)styCtrl.SetSelBackground(True, wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHT))styCtrl.SetSelForeground(True,wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT))...(Set *()命令束)
不知道是否有办法加载预定义的配色方案。 您可以在YAML中定义它,并通过上述命令及其他命令将其加载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.