QQ群:476842922(欢迎加群讨论学习)
import wx
value1 = "Shine bright like a diamond\n"
value2 ="In the beautiful sea\n"
app = wx.App()
win = wx.Frame(None,title='MY TEST',size=(600,700))
text = wx.TextCtrl(win,style = wx.TE_MULTILINE|wx.TE_WORDWRAP|wx.TE_READONLY|wx.TE_RICH2)
text.SetDefaultStyle(wx.TextAttr(wx.RED))
text.AppendText(value1)
text.AppendText(value2)
 
win.Show()
app.MainLoop()

wx.TextCtrl设置字体颜色

相关文章:

  • 2021-12-29
  • 2022-02-07
  • 2021-12-12
  • 2021-11-23
  • 2022-01-17
  • 2022-02-09
  • 2022-02-18
  • 2021-11-28
猜你喜欢
  • 2022-02-21
  • 2021-10-28
  • 2021-12-10
  • 2021-08-18
  • 2022-03-02
  • 2022-01-21
  • 2021-08-23
相关资源
相似解决方案