[pygtk] modify gtk button color

vector vector180 at aanet.com.au
Tue Jan 31 10:03:41 WST 2006


Im sure this has been dealt with b4 but I have searched and tried 
various things and Im just not "getting" it.
 From what i read I think the labels background in the button is what i 
want to set. Ergo i need to find the "child"!?.And this is where i fail.
# set up button
        button = gtk.Button("hello")

#modify its color
        child_label=gtk_bin_get_child (GTK_BIN (button))
        
child_label.modify_fg(gtk.STATE_NORMAL,gtk.gdk.color_parse("light pink"))
NameError: global name 'gtk_bin_get_child' is not defined


Im possibly not even close?


More information about the pygtk mailing list