Re: change colour font of a label!



On Thu, Feb 22, 2007 at 10:47:20AM +0100, Alessandro Oliva wrote:
ferri_marllo gva es wrote:
Hello!!
I need to change the colour font of a label...can you help me??
thanks a lot!

GtkLabel    *lbl_status;

GdkColor color;
gdk_color_parse ("white", &color);

PangoFontDescription *font_desc;



gtk_widget_modify_fg (GTK_WIDGET(lbl_status), GTK_STATE_NORMAL, &color);


 font_desc = pango_font_description_from_string ("Arial 8");
 gtk_widget_modify_font (GTK_WIDGET(lbl_status), font_desc);
 pango_font_description_free (font_desc);

What about

  gtk_label_set_markup(GTK_LABEL(label), "<span color=\"#00a000\">Text</span>");

instead?

Yeti


--
Whatever.



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