RE: setting background color of eventbox ... how?



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);   


Regards,
Martyn



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