Set a GTK2 checkbutton background color with respect to its state

67 views Asked by At

I cannot set the background color of a checkbutton with respect to its state. By default, it appears red when checked and white when unchecked :

enter image description here

I tried gtk_widget_modify_base() without success :

GdkColor colGreen;
gdk_color_parse("#90ee90", &colGreen);
GtkWidget * myCheck = gtk_check_button_new_with_label("S1");
gtk_widget_modify_base(GTK_WIDGET(myCheck), GTK_STATE_ACTIVE, &colGreen);

Would be quit glad to get some hints from the community !

Cheers

0

There are 0 answers