Hi, I need to make a StaticText red, what should I use?
+2
A:
Depending on which color you would need to set, look into SetForegroundColour()
or SetBackgroundColour()
method.
artdanil
2009-11-23 21:58:16
+1
A:
Here it is
import wx
app=wx.PySimpleApp()
frame=wx.Frame(None)
text=wx.StaticText(frame, label="Colored text")
text.SetForegroundColour((255,0,0)) # set text color
text.SetBackgroundColour((0,0,255)) # set text back color
frame.Show(True)
app.MainLoop()
Anurag Uniyal
2009-12-03 15:25:16