[英]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.