Liquid <[EMAIL PROTECTED]> writes:

Liquid> Hi guys, I have a little problem.  I really can't
Liquid> understand how to define a certain type of font that I
Liquid> want in my widgets, for example I'm doing this:


Liquid>                 font_desc = pango.FontDescription('monospace')

Liquid>                 frame = gtk.Frame("title") label =
Liquid> gtk.Label("som text here")

Liquid>                 label.modify_font(font_desc)

Liquid> now the label use the monospace font, but the question
Liquid> is...how I can set for example a font size or a font color
Liquid> for the text in that lable?

The simplest way to do this for labels is to use Pango markup.  It's
really easy to use.

label.set_markup('<span face="monospace" size="12000" foreground="red">title</span>')
label.set_use_markup(gtk.TRUE)

Look at the pango markup docs at
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to