RE: setting background color of eventbox ... how?
- From: Owen Taylor <otaylor redhat com>
- To: gtk-app-devel-list gnome org
- Cc: karl h beckers gmx net
- Subject: RE: setting background color of eventbox ... how?
- Date: Wed, 21 Jan 2004 10:45:22 -0500
On Wed, 2004-01-21 at 08:40, martyn 2 russell bt com wrote:
If somebody could point me to what I'm doing wrong here, that
would be much
appreciated.
This is how I did it:
GtkRcStyle *rc_style = NULL;
GdkColor color;
/* for green */
color.red = 0
color.green = 0xffff;
color.blue = 0;
rc_style = gtk_rc_style_new();
rc_style->bg[GTK_STATE_NORMAL] = color;
rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BG;
gtk_widget_modify_style(cd->controls.eventbox_cd_duration,rc_style);
gtk_rc_style_unref(rc_style);
Why not simply
gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color);
See:
http://ometer.com/gtk-colors.html
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]