wx.TextCtrl.SetDefaultStyle not working?
bcwhite at pobox.com
bcwhite at pobox.com
Fri Apr 20 22:38:55 EDT 2007
I'm running Python2.5 with wxPython v2.8.3.0 under WinXP and I cannot
get the SetDefaultStyle method to work.
I'm trying:
self.output.SetDefaultStyle(wx.TextAttr(wx.RED))
self.output.AppendText(text)
self.output.SetDefaultStyle(wx.TextAttr())
where "self.output" is a TextCtrl window. The text appears, but it's
always black. If I print the output of
self.output.GetDefaultStyle().GetTextColour() before resetting it back
to default, I see "(255, 0, 0, 255)". After reset, it's "(-1, -1, -1,
255)".
The font in that window is the system default.
Am I doing something wrong?
-- Brian
More information about the Python-list
mailing list