I'm displaying an image in a button, like this:
def set_button_icon( self, btn, fname, width = 40, height = 40 ):
pb = gtk.gdk.pixbuf_new_from_file( fname )
pb = pb.scale_simple( width, height, gtk.gdk.INTERP_BILINEAR
)
img = gtk.Image()
img.set_from_pixbuf( pb )
btn.set_label( '' )
btn.set_image( img )
where btn is a gtk.Button
However the image is drawn beginning from the top left corner of the button.
How can I align it to the center?
Thanks
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/