Manyy widgets are 'Windowless,' that is, they draw on their parent's
window ahd have no window of their own. GtkFrame is one such widget.
You'll need to place it inside a window to make the background grey.
The style settings only apply to the areas that the GtkFrame draws on.
The easiest way to get the frame inside a window is to use
GtkEventBox.
from gtk import *
window = GtkWindow ()
style = window.get_style ().copy ()
style.bg[STATE_NORMAL] = style.black
window.set_style (style)
window.set_border_width (10)
eb = GtkEventBox ()
frame = GtkFrame ("test")
eb.add (frame)
window.add (eb)
window.show_all ()
mainloop ()
Matt
On Mon, Jan 10, 2000 at 01:37:43PM +0100, Javi Rom�n wrote:
> Hi:
>
> I have a program that uses black background color in the main window:
>
> ...
> window = GtkWindow ()
> style = window.get_style ().copy ()
> style.bg[STATE_NORMAL] = style.black
> window.set_style (style)
> ...
>
> When I put any widget (vbox -> GtkFrame, for instance) GtkFrame
> background color is black and I want a gtk-system color background for
> this widget so I use get_style and set_style but doesn't work.
>
>
> Regards.
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]