Thank you for your example, it's work but... in mine, the hand cursor is showed in the whole window and I would like to see it only whn the mouse is on the eventBox. Is it possible ?
Thank you for your help, Axel > Try this program: > > --------------- > import gtk > w=gtk.Window() > f=gtk.Fixed() > w.add(f) > eb=gtk.EventBox() > eb.set_visible_window(False) > f.add(eb) > l=gtk.Label('TESTING') > eb.add(l) > w.show_all() > eb.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND2)) > gtk.main() > --------------- > > Works for me. > > John > --
import pygtk pygtk.require('2.0') import gtk import lec01 class Ikurso: def runLec01(self,widget,Data=None): leciono1 = lec01.Leciono1() leciono1.main() def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.set_resizable(False) self.window.connect("destroy", self.destroy) #kreu la "ujo" fixed = gtk.Fixed() self.window.add(fixed) #kreu la bildon image = gtk.Image() fixed.put(image,0,0) #image.set_from_file("ekrano.jpg") image.set_from_file("Menuo.png") ##kreu butonon por cxiuj lecionoj ## Leciono 1 eb = gtk.EventBox() eb.set_visible_window(False) eb.add_events(gtk.gdk.POINTER_MOTION_MASK) eb.connect("button_press_event", self.runLec01) fixed.put(eb,500,50) l = gtk.Label("Leciono 1") eb.add(l) self.window.show_all() eb.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND1)) def main(self): gtk.main() def destroy(self, widget, data=None): gtk.main_quit() print __name__ if __name__ == "__main__": ikurso = Ikurso() ikurso.main()
_______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/