Re: [PHP-GTK] GtkNotebook Tab Label background with XP Theme??

[email protected] (Jake Cobb)
Newsgroups php.gtk.general
Message-ID <[email protected]>
Elizabeth M Smith wrote:
> Adz07 wrote:
>> I am gussing I have to match the label background to the GtkNotebook
>> background?? Problem is what if I want to change themes??
>>
>>
>>
>>
>>
>> Adz07 wrote:
>>> ** Sorry for double post, I posted to wrong forum :( **
>>>
>>> Is there a way to make the background of a GtkNotebook tab label
>>> transparent?
>>> I have the XP theme so the GtkNotebook is an off white, but the tab 
>>> labels
>>> show as having a grey background??
>>> Any one know away around this?
>>> Cheers, Adam
>>>
>>>
>>
> trying to control theming without forcing the theme with rc files will 
> only lead to pain - it would be better to design your app to look good 
> in any user theme unless you control the hardware/software setup
>
Have you tried taking the base color of the notebook and setting it for 
your labels?  I haven't tested this, but maybe something like:

$pages = $notebook->get_n_pages();
$notebook_base = $notebook->get_style()->base;
for($i = 0; i < $pages; ++$i)
{
    $tab_label = $notebook->get_tab_label($notebook->get_nth_page($i));
    $tab_label->modify_base(Gtk::STATE_NORMAL, $notebook_base);
}


-Jake Cobb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.