On Fri, 19 Mar 2004 17:50:18 +0530
"Somesh Bartakke" <[EMAIL PROTECTED]> threw this fish to the penguins:
> i want to change label color , i tried with
>
> label1.set_markup('<font color=red>mytext</font>')
I ran your test with pygtk-1.99.17, gtk+-2.2.4, python-2.3.3, and got:
Gtk-WARNING **: Failed to set label from markup due to error parsing markup: Error on
line 1 char 21: Odd character 'r', expected an open quote mark after the equals sign
when giving value for attribute 'color' of element 'font'
I put quotes around "red" and got:
Gtk-WARNING **: Failed to set label from markup due to error parsing markup: Unknown
tag 'font' on line 1 char 27
Hmm, it doesn't like "font". Then I copied from a piece of my own code:
label1.set_markup('<span color="red">mytext</span>')
and it worked. See:
http://www.pygtk.org/pygtk2reference/pango-markup-language.html
If you didn't get the above "Gtk-WARNING" messages, maybe you should upgrade
to the latest gtk/pygtk versions...
I wonder if a searchable version of the pygtk docs wouldn't be helpful. It took me
some
hacking to find this reference because words like 'font' are extremely common in the
html(meta)
part of the docs. Are the doc sources in some form that would be easily searchable?
-- George Young
--
"Are the gods not just?" "Oh no, child.
What would become of us if they were?" (CSL)
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/