[gtk-list] Background color in GtkText

According to Jeremy Wise:
| I also tried using the style method, by changing
| style->bg[ GTK_STATE_NORMAL ] to background, but still had no luck.

This is the step in the right direction, but you're using the wrong array.
Here's how I would do it...

GtkStyle *style;


style = gtk_style_new ();
style->fg[GTK_STATE_NORMAL] = foreground;
style->text[GTK_STATE_NORMAL] = foreground;
style->base[GTK_STATE_NORMAL] = background; /* base not bg */

gtk_widget_set_style (GTK_WIDGET (entry), style);

Hope this helps.


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