> > I'm not sure if I understood your problem correctly, but maybe this > will help (replace gtk.Window with appropriate Widget class): > > iconsdir = './icons' > imagename = 'image.png' > > win = gtk.Window() > path = os.path.join(iconsdir, imagename) > pixbuf = gtk.gdk.pixbuf_new_from_file(path) > pixmap, mask = pixbuf.render_pixmap_and_mask() > width, height = pixmap.get_size() > del pixbuf > win.set_app_paintable(gtk.TRUE) > win.resize(width, height) > win.realize() > win.window.set_back_pixmap(pixmap, gtk.FALSE) > del pixmap
Thanks - that works well with a gtk.Window, but not it seems with other widgets. For example if I change your code to that below, I don't get the pixmap shown. Similarly for tables and buttons. What am I missing? ------------------ import gtk,os iconsdir = './icons' imagename = 'image.png' win = gtk.Window() path = os.path.join(iconsdir, imagename) pixbuf = gtk.gdk.pixbuf_new_from_file(path) pixmap, mask = pixbuf.render_pixmap_and_mask() width, height = pixmap.get_size() del pixbuf label = gtk.Label("A Label") win.add(label) label.set_app_paintable(gtk.TRUE) win.resize(width, height) label.realize() label.window.set_back_pixmap(pixmap, gtk.FALSE) del pixmap label.show() win.show() gtk.main() -------------------- Regards, Chris _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/