Re: [pygtk] Making fonts bold
- From: James Henstridge <james daa com au>
- To: Christian Robottom Reis <kiko async com br>
- Cc: <gtk-app-devel-list gnome org>, <pygtk daa com au>
- Subject: Re: [pygtk] Making fonts bold
- Date: Mon, 3 Sep 2001 08:57:51 +0800 (WST)
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]