gtk_widget_modify_bg on event_box



I am having a problem with some code that sets the background color
on an event box.  The code is in the program PCB.

I THINK THE PROBLEM IS IN MY ENVIRONMENT.

The problem I experience is the failure to change the color, although
the color value and function call look quite fine.

In my case, I want to look at my system and environment, and not the
code.   My environment started out as a standard Suse 9.1 distribution.
This distribution came with the GTK 1.2 and an older GLIB as well.
The PCB program requires the newer GTK and GLIB, so I downloaded,
built and installed GTK 2.6.x and GLIB (2.8.9 I think). I had some trouble
with conflicts, but I am suspecting that I may not have cleared all of
the conflicts. I get no compilation errors or run-time warnings, but, the
background color of the event box remains unchanged.

Are there any 'things'  on my system (i.e. conflicts with older versions
of gtk) that can cause this kind of problem?

The code looks like this:

                ebox = gtk_event_box_new();
                gtk_container_add(GTK_CONTAINER(ebox), label);
                gtk_container_add(GTK_CONTAINER(button), ebox);
                gtk_table_attach_defaults(GTK_TABLE(table), button,
                                        1, 2, i, i + 1);
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button), FALSE);

                lb->layer_enable_button = button;
                lb->layer_enable_ebox = ebox;
                lb->text = g_strdup(text);
                lb->label = label;

                layer_button_set_color(lb, color);
.
.
.
.layer_button_set_color(LayerButtonSet *lb, GdkColor *color)
        {
        if (!lb->layer_enable_ebox)
                return;
gtk_widget_modify_bg(lb->layer_enable_ebox, GTK_STATE_ACTIVE, color); gtk_widget_modify_bg(lb->layer_enable_ebox, GTK_STATE_PRELIGHT, color);

        gtk_widget_modify_fg(lb->label, GTK_STATE_ACTIVE,
                                &Settings.WhiteColor);
        }








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