GtkButton bg color



After scouring the books, documents, and various examples i still can't
change the bg color of a gtk button.

I've tried using a local rc file and various direct methods with code
such as:

gtk_widget_modify_bg(button, GTK_STATE_NORMAL, &color);

The documentation seems to suggest that i can change this with the
GtkRcStyle, but i can't seem to get that working either.
http://developer.gnome.org/gtk/2.24/GtkWidget.html#gtk-widget-modify-style

I'm working with C programming language, but here is an example of what
i'm trying to:
http://stackoverflow.com/questions/1241020/gtk-create-a-colored-regular-button

Obviously that's phpgtk, I've not been able to convert it to C as i
can't find adequate documentation on the context's of the rcstyles when
reading and writing to the GtkRcStyle.

Can anyone whip up a simple example that colors a single button, with C
programming language?

Steve



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