Kranz, Willi wrote:
How can I change the color of an EventBox.

Is there a small example available.


Event boxes derive from GtkWidgets, so you can use the gtk_widget functions:
gtk_widget_modify_fg ()
gtk_widget_modify_bg ()
or for other options, gtk_widget_modify_style ()

see the GtkWidget page in the reference manual at
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html

for example, to set the background red, one would use some code similar to:
GtkEventBox *event_box;
GdkColor red;

... code to create event box ...

red.red = 65535;
red.green = 0;
red.blue = 0;

gtk_widget_modify_bg(GTK_WIDGET(event_box), GTK_STATE_NORMAL, &red);


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

Reply via email to