Re: Event not passing to Notebook when Label has Eventbox



Markus Fischer wrote:
>         But, when using this GtkEventBox, there a light gray
> border around the Label at the Notebook ? Can I remove this ?
> I've set up a screenshot to show what I mean [1].

Hi Markus, this is easy to fix ... the problem is that notebook draws
the tab for not-current pages in a darker colour, but your eventbox does
not know this (it's just an eventbox, it doesn't know its really a tab
in a notebook).

The fix is to set the state of the eventbox yourself when you switch
pages. In my app, I have something like this:

        if( page->ontop ) 
                gtk_widget_set_state( GTK_WIDGET( pageview->tab ), 
                        GTK_STATE_NORMAL );
        else 
                gtk_widget_set_state( GTK_WIDGET( pageview->tab ),
                        GTK_STATE_ACTIVE );

This ought to work, even if the user is using a funky theme.

HTH, John




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