[pygtk] Help with set_cursor() ---- Invisible cursor option
DINESHBABU DINAKARABABU
dinesh243 at gmail.com
Tue Aug 4 06:05:26 WST 2009
Hi,
Now, it throws:
AttributeError: 'NoneType' object has no attribute 'set_cursor'
I agree to the fact that it is a gtk.gdk.Window object. Does win.window
invoke a gtk.gdk.Window object? Correct me if am wrong as I am still
learning the details and tricks associated with python and gtk.
Thanks again for your time. I really appreciate your help.
On Mon, Aug 3, 2009 at 2:56 PM, John Finlay <finlay at moeraki.com> wrote:
> On 08/03/2009 09:23 PM, John Finlay wrote:
>
> DINESHBABU DINAKARABABU wrote:
>
>
> Hi everyone,
>
> I am pretty new to Python and Pygtk. I would be grateful if someone
> could help me out with this issue.
>
> I am trying to get a full screen display of an image from some raw
> data using the pixbuf_new_from_data() method. I want to do away with
> the default cursor option and implement an invisible cursor so that we
> don't see the cursor during the full screen display. To implement the
> invisible cursor, I am doing the following:
>
> pixmap = gtk.gdk.Pixmap(None, 1, 1, 1)
> color = gtk.gdk.Color()
> cursor = gtk.gdk.Cursor(pixmap, pixmap, color, color, 0, 0)
> gtk.gdk.Window.set_cursor(cursor)
>
> However, I am getting this error:
>
> TypeError: descriptor 'set_cursor' requires a 'gtk.gdk.Window' object
> but receives a 'gtk.gdk.Cursor'.
>
>
>
> Try using:
>
> win.set_cursor(cursor)
>
> The error message is indicating that you have passed the wrong object to
> the function gtk.gdk.Window.set_cursor() which requires a Window object
> and a Cursor object as args. You should invoke the method of the Window
> object win instead.
>
>
>
> My mistake it should be:
>
> win.window.set_cursor(cursor)
>
> since it's the gtk.gdk.Window object not the gtk.Window object.
>
> john
>
--
Cheers
DB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090803/13a73638/attachment-0001.htm
More information about the pygtk
mailing list