簡體   English   中英

wxPython:更改wx.stc.StyledTextCtrl的配色方案

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

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM