Re: Label - Text manipulation, setting text to bold, italic...



hp wrote:

How do I edit text in my label to make it bold or to italicize it?

is there any function to do this? or do I need to use pango for this?

The easiest way is to use Pango markup:
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html

You need to call gtk_label_set_markup() to set marked up string into the label or gtk_label_set_use_markup() to tell the label that string you've passed is marked:
http://developer.gnome.org/doc/API/2.0/gtk/GtkLabel.html#gtk-label-set-markup
http://developer.gnome.org/doc/API/2.0/gtk/GtkLabel.html#gtk-label-set-use-markup

   Olexiy




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