[pygtk] Fwd: Question

John Finlay finlay at moeraki.com
Wed Feb 11 08:29:16 WST 2009


Johan Dahlin wrote:
> ---------- Forwarded message ----------
> From: Rodrigo Almeida <rodrigoalmei at gmail.com>
> Date: Tue, Feb 10, 2009 at 6:37 PM
> Subject: Question
> To: pygtk-web at async.com.br
>
>
> Hello Friends,
>
> I'm a programmer from Brasil, and i am doing an application using pygtk.
> I would like to know if you can help me. My question is: is there a
> way to use an image as a cursor?
>
> something like this:
>
> self.image.set_from_file("myimage.png")
> self.Tela.window.set_cursor(self.image)
>
> I hope you can help me.
>
> Greetings.
>
> Rodrigo Almeida.
>   
pb = gtk.gdk.pixbuf_new_from_file("myimage.png")
c = gtk.gdk.Cursor(gtk.gdk.display_get_default(), pb, 0, 0)
widget.window.set_cursor(c)

John



More information about the pygtk mailing list