GtkLabel foreground color



 I try to change the GtkLabel foreground color using following code:

     PangoAttrList *attrList = pango_attr_list_new();
     pango_attr_list_insert(attrList,
                          pango_attr_foreground_new(255, 0, 0));
     pango_attr_list_insert(attrList,
             pango_attr_weight_new(PANGO_WEIGHT_BOLD));
    gtk_label_set_attributes(GTK_LABEL(titleLabel), attrList);
    pango_attr_list_unref(attrList);


But the foreground color is chagned to BLACK not RED.
What's wrong with my code?


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