Re: RC file woes




Mike Oliphant <oliphant@ling.ed.ac.uk> writes:

> Ok, I've managed to mostly get me head around gtk's .rc files, but I am
> still having a bit of trouble.
> 
> First, I have a notebook with a number of frames inside it. I want the
> contents of one of the frames to have a different background color.
> Ideally, I want to be able to change the color of a vbox inside of a
> specific frame.
> 
> So, in my .rc file, how can I:
> 
>  o address the *contents* of a frame (in this case a vbox), rather
>    than the frame itself
> 
>  o address a *specific* frame inside of a notebook

In an RC file, you can do this by giving your frame a specific
name with gtk_widget_set_name()

 gtk_widget_set_name (frame, "SpecialFrame");

then, to set the background color of everything inside this frame,
you can put the following inside an RC file:

======
style "special_style" {
  bg[NORMAL] = "#ccccff" 
}

widget "*.SpecialFrame.*" style "special_style"
======


Note that you can't change the color of the background of a frame
or a VBox because they both have conceptually "transparent"
backgrounds. But, you could, for instance, put an event
box inside your frame and put the VBox inside of that, to
get the effect you want.

(Warning, doing this type of thing probably will interact quite
 badly with themes, so should be avoided whenever possible)

Regards,
                                        Owen



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