[pygtk] Help with set_cursor() ---- Invisible cursor option

DINESHBABU DINAKARABABU dinesh243 at gmail.com
Tue Aug 4 05:47:33 WST 2009


Hi John,

I tried giving win.set_cursor(cursor). That doen't seem to solve the issue.

Now, I get the following error.

AttributeError: 'gtk.Window' object has no attribute 'set_cursor'.

Thanks a lot for the reply. I really appreciate it.

On Mon, Aug 3, 2009 at 9:23 PM, John Finlay <finlay at moeraki.com> 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.
>
> John
>



-- 
Cheers
DB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090803/78145ebb/attachment.htm 


More information about the pygtk mailing list