george young wrote:
[pygtk-1.99.16, gtk+-2.2.1, python 2.3a1]Try:
I have a gtk.Frame containing a VBox containing numerous widgets.
I need to dynamically mark the frame as "this app has an exclusive
write-lock on the contained data -- use it soon and release it", which I do by: theframe.modify_bg(red_color)
This works, but is not striking enough visually. I've been trying
to make the frame's box have a thicker linewidth. This seems to be controlled by the read-only attributes style().xthickness and style().ythickness. I tried:
gtkrcfile:
style "gtkFrame"
{
xthickness = 8 #the default is 2
ythickness = 8
}
widget "gtkFrame" style "gtkFrame"
widget "*.GtkFrame" style "gtkFrame"
But this won't get the effect you want since the frame shadow will only be drawn a maximum of 2 pixels wide. You will get a border of 8 around the frame though not all in red.
I figure the best way to get what you want is to use two EventBoxes and set the border width on the second to the width you want. Here's a test program that may give results similar to what you want:but this doesn't seem to work. Is there something wrong with this rcfile syntax? Is there some other way to get a thick box wrapped around a widget?
import gtk
w=gtk.Window()
red=gtk.gdk.color_parse('red')
eb=gtk.EventBox()
eb.modify_bg(gtk.STATE_NORMAL, red)
w.add(eb)
eb1=gtk.EventBox()
eb1.set_border_width(10)
eb.add(eb1)
vb=gtk.VBox()
eb1.add(vb)
b=gtk.Button("TEST")
vb.pack_start(b)
e=gtk.Entry()
vb.pack_start(e)
w.show_all()
gtk.main()You can use just one EventBox and set the border around the VBox but the space between packed widgets will also be red.
John
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
