Re: [pygtk] Making fonts bold



On Sun, 2 Sep 2001, Christian Robottom Reis wrote:


What's the standard way to make labels bold in GTK? Define an rc (or
programmatic) style with the bold font, and apply that style to the
selected widgets?

For gtk 1.2, there is no easy way to get the bold version of a particular
GdkFont.  For 2.0, it is trivial due to pango's more flexible font
handling.  For labels, you can do the following, which won't depend on the
selected theme:
  label = gtk.GtkLabel('')
  label.set_markup('<b>bold text</b>')

James.

-- 
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]