[pygtk] font color in a label
jdennis at redhat.com
Tue Apr 3 21:13:49 WST 2007
On Mon, 2007-04-02 at 19:07 -0400, Christopher Cole wrote:
> i'm currently setting the color of a label in my code with the following:
> state_label.set_label('<span foreground=\"green\">Active</span>')
> is there a good way to specify a hex value (e.g. #009900) as an
> alternative to the green this defaults to? would this be something
> well suited for an rc file? any other best practice solutions?
<span foreground="#00FF00"> will do the trick so perhaps I missed the
real intent of your question.
You can also use styles to control the labels appearance which can be
read from a resource file, although note because labels are windowless
widgets you can't set the background, see the following for an
John Dennis <jdennis at redhat.com>
Learn. Network. Experience open source.
Red Hat Summit San Diego | May 9-11, 2007
Learn more: http://www.redhat.com/promo/summit/2007
More information about the pygtk