dc.SetPen(wx.Pen((255,0,0)))
dc.DrawText(10,10, "Hello, world!")
doesn't actually result in text in the desired color - instead it uses
whatever the foreground color of the underlying widget is set to. So
I can't draw text in multiple colors on a wx.DC right now. Is there
something I'm missing? (wxPython 2.9.4, wxOSX-Cocoa, OS 10.6, if it
matters.)
thanks,
Nat
Text is never drawn with the current pen. It's drawn with the current
text color. Try
dc.SetTextForeground((255,255,0))
This is a historical implementation detail in Windows GDI. The pen is
used for lines, the brush is used for fills, and text had its own
attributes.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
Thanks, that appears to do what I wanted, at least on Mac.
-Nat