[pygtk] rc file woes

Chris Cole ccole2 at mix.wvu.edu
Mon Nov 26 02:17:38 WST 2007


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 }
}


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)




Thanks,
   Chris


More information about the pygtk mailing list