Problem with window background (was : Re: [pygtk] Possible to layer
widgets ?)
Firas Kraiem
fkraiem at enib.fr
Wed May 2 11:29:55 WST 2007
Hi again :)
I have a slight problem with the code displayed there : it doesn't display my
background :p The weird thig is that it recognizes it because the window is
resized at the correct size. Here's my code, any ideas why it doesn't work ?
window = gtk.Window()
path = "./data/graphics/newBackground.png"
backgroundPixbuf = gtk.gdk.pixbuf_new_from_file(path)
backgroundPixmap = backgroundPixbuf.render_pixmap_and_mask()[0]
width, height = backgroundPixmap.get_size()
del backgroundPixbuf
window.set_app_paintable(True)
window.resize(width, height)
window.realize()
window.window.set_back_pixmap(backgroundPixmap, False)
del backgroundPixmap
Thanks,
Firas
On Monday 30 April 2007 22:25:14 Firas Kraiem wrote:
> I think that's what I was looking for, I guess I misunderstoo how the Fixed
> container behaves. Thanks !
>
> On Monday 30 April 2007 21:44:30 Gian Mario Tagliaretti wrote:
> > 2007/4/30, Firas Kraiem <fkraiem at enib.fr>:
> > > Basically, what I want to achieve is something similar to a "Fixed"
> > > container but with an image as background instead of solid color.
> >
> > you can set an image as background:
> > http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq08.013.htp
> >
> > or I misunderstood?
> >
> > cheers
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20070502/c8f9d036/attachment.pgp
More information about the pygtk
mailing list