wxPython ,Change the background colour of a StyledTextCtrl
- by user1357159
I tried (but nothing happens)
self.txt.SetBackgroundColour ((255,0,0))
As said in the title I'm trying to change the background colour StyledTextCtrl. Does anyone know a method that could be used? I've checked the API docs but I couldn't seem to find one, http://wxpython.org/docs/api/wx.stc.StyledTextCtrl-class.html
(by background colour, I mean the whole writing area, of course)
Does anyone know a way I could do this?
EDIT:
The background doesn't change in the following code
import wx
import wx.stc
app = wx.App(redirect=True)
top = wx.Frame(None, title="StyledTXTCtrl", size=(300,200))
txt=wx.stc.StyledTextCtrl(top)
txt.SetBackgroundColour((255,255,0))
txt.Refresh()
top.Show()
app.MainLoop()