[pygtk] Images

Luis Javier Peris javierperis at gmail.com
Fri Dec 29 02:02:22 WST 2006

Hi, I write you looking for help, I've some questions about pygtk.

I've maden a GUI with Glade using images in xpm format and now I'm working
with python to handler the signals. My questions are:

1.- The images are inserted into eventbox and I can see them in a correctly
way using Glade. However, when I execute the application(python
applicationame) I can't see the images. I know that the images are really in
the eventbox, I mean, if I try load another image it appears a warning
saying: a eventbox only can have a image, no more. I write here the code of
the constructor method(wMain is the application windows where it would have
appear the images):

def __init__(self,file):
        self.widgets =3D gtk.glade.XML(file)
        self.window =3D self.widgets.get_widget("wMain")

2.- My second question is: how I can remove a image of a eventbox? My
intention is to have a image in a part of the window and to change it when
somebody enters the mouse in this zone. Looking PyGtk Reference, there are
GtkContainer functions like remove or get_child that I think could be useful
to remove or to get the child of the eventbox but I don't very well how use
them and if this is the correct way to do my target. Has somebody an

Thanks for your time and sorry for my English.

Marry Christmas, regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20061228/88d148be/at=

More information about the pygtk mailing list