Re: GtkButton bg color

2012-04-29 Thread Steve

I'm using linux. I've tried dozens of different methods and a few
examples which seem to suggest that they will change the background but
noting works.

I scrapped all that code and started over from scratch. I can change
the fg color with no problems but i can't seem to get anything to work
with the bg color


Any chance you can provide an example of a button with a background
color?


Steve
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkButton bg color

2012-04-29 Thread Michael Cronenworth

On 04/29/2012 11:30 AM, Steve wrote:

gtk_widget_modify_bg(button, GTK_STATE_NORMAL,&color);


This is the right call, but I have found that this doesn't work on 
Windows. Are you running the program in Windows? Coloring works fine for 
me in Linux.


If you're running Linux, your color variable may not be setup correctly. 
How are you defining it?

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkButton bg color

2012-04-29 Thread Steve
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
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list