El día Sun, 25 Nov 2007 12:17:38 -0500
Chris Cole <[EMAIL PROTECTED]> escribió:
> Hey all,
> I'm trying to set the background color of a button to red using rc
> files, but am running into some problems. Here's what I have in the rc file:
>
> style "button"
> {
> bg[NORMAL] = { 1.0 , 0, 0 }
> }
try with this:
---8<---
style "button-style"
{
bg[NORMAL] = { 1.0, 0, 0 }
}
widget "*.button" style "button-style"
--->8---
> and sample code:
>
> #!/usr/bin/python
>
> import gtk, sys
>
> gtk.rc_parse('rc')
>
> w = gtk.Window()
> b = gtk.Button('foo')
> b.set_name('button')
> w.add(b)
> w.set_size_request(300,300)
> w.show_all()
>
> try:
> gtk.main()
> except KeyboardInterrupt:
> sys.exit(0)
>
see: http://www.moeraki.com/pygtkreference/pygtk2reference/class-gtkrcstyle.html
"Pathnames and patterns"
Best regards,
--Augusto
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/