[gtkada] Background color on notebook tabs

Rob Groen robgr at xs4all.nl
Sat Jul 26 09:11:18 CEST 2003


Hi

In order to get a background color on notebook tabs I put the tab label in an eventbox, use set_rgb to get a color, create a new style and do

    set_background (Style, eventbox, STATE_NORMAL);

However, this only works when the notebook page is the active page. When the notebook page is not active you have to use

    set_background (Style, eventbox, STATE_ACTIVE);

This seems to me very strange. Why does the state of the eventbox changes when a page is active or not? 

BTW, another thing I noticed is that an eventbox used as the 'label' widget of a notebook doesn't get any events, or at least no handlers are being called for the eventbox (e.g. enter/leave_notify_event to change the color and/or font of the label when the mouse is over the widget). How can I get the eventbox to handle events?

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20030726/f276d4ad/attachment.htm 


More information about the gtkada mailing list