[pygtk] Help with set_cursor() ---- Invisible cursor option
John Finlay
finlay at moeraki.com
Tue Aug 4 08:05:00 WST 2009
On 08/03/2009 03:05 PM, DINESHBABU DINAKARABABU wrote:
> 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.
>
This means that there is no gtk.gdk.Window associated with the
gtk.Window (win in this case). This is usually because the gtk.Window
has not been realized (have a look at the tutorial which has an
description of the widget display methods). You can call the widget
realize() or show() methods before setting the cursor, or connect to the
realize signal of win and set the cursor in the callback.
John
More information about the pygtk
mailing list