Re: Change the color of an EventBox
- From: Will Luesley <lists luesley com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Change the color of an EventBox
- Date: Wed, 26 Oct 2005 15:33:13 +0100
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]