【发布时间】:2009-07-31 08:51:06
【问题描述】:
我有一个 PyShell,它应该来自 wx.stc.StyledTextCtrl。如何更改它当前使用的配色方案?
【问题讨论】:
标签: python user-interface wxpython color-scheme
我有一个 PyShell,它应该来自 wx.stc.StyledTextCtrl。如何更改它当前使用的配色方案?
【问题讨论】:
标签: python user-interface wxpython color-scheme
你可以使用 styledTextCtrl.StyleSetSpec(wx.stc.STC_STYLE_INDENTGUIDE, "fore:#CDCDCD") (一堆 .StyleSetSpec 属性) ... ... ... styCtrl.SetCaretForeground("蓝色") styCtrl.SetSelBackground(真,wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHT)) styCtrl.SetSelForeground(True, wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)) ... (一组 Set*() 命令)
不知道是否有办法加载预定义的配色方案。 你可以在 YAML 中定义它,然后通过上面的命令加载它。
【讨论】: