Thank you Steve for the idea! I tried with eventBox, and it works for the
table, but doesn't work for the layout.
The problem is, that my widgets lie on the layout that is attached to the
table. All I want to do now is to make
the layout transparent, but the widgets that the layout contains I want to
be showed. Is there any way i can do
that??

Thank you,
Thanasis

On Wed, Jan 27, 2010 at 6:26 PM, Steve McClure <smccl...@racemi.com> wrote:

>
> On Jan 27, 2010, at 11:14 AM, Petsas Athanasios wrote:
>
>
> I have used the code of the dragndrop.py example that can be found here:
> http://www.pygtk.org/pygtk2tutorial/sec-DNDMethods.html
>
> I have not change so many things.. So I think you can understand more if
> you give a look at this.
>
>
> Perhaps I should be able to see it but I don't understand how the "win"
> object is added to the UI anywhere.  I would assume that the gtk.Layout has
> a window property and that is the window that you want use. Not a new
> window.
>
> As an example, see:
> http://faq.pygtk.org/index.py?req=show&file=faq08.021.htp
>
> The main window contains and eventbox, when the eventbox is exposed, the
> pixmap drawn into the eventbox's window.
>
> Substitute your Layout, or Table for the eventbox and you should be headed
> in the right direction.
>
>
> Thank you for the interest
>
> On Wed, Jan 27, 2010 at 5:55 PM, Steve McClure <smccl...@racemi.com>wrote:
>
>>
>> On Jan 27, 2010, at 10:14 AM, Petsas Athanasios wrote:
>>
>> Hello all,
>>
>> I have created a gtk.Layout and I have attached it in a gtk.Table. What I
>> want to do is to put a background image in it, where the
>> widgets will be placed. How I can do this? I try the code below that
>> change the background image of the window, but this doesn't work on
>> the layout or the table. Can anybody help me on this?
>>
>>
>> It's been a while since I've messed with GTK, but your window has to be
>> managed my someone.  How does the Layout manage the new gtk.Window() that
>> you created?
>>
>>
>> Thank you in advance,
>> Thanasis
>>
>> code:
>>
>> import gtk
>> imagename = 'image.jpg'
>>
>> win = gtk.Window()
>> pixbuf = gtk.gdk.pixbuf_new_from_file(imagename)
>> 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
>> win.show() _______________________________________________
>> pygtk mailing list   pygtk@daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>>
>>  --
>> Steve McClure
>> smccl...@racemi.com
>>
>>
>
>  --
> Steve McClure
> smccl...@racemi.com
>
>
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to