Ionutz Borcoman wrote:
Hi,
The reference says:
"To make the cursor invisible, use gtk.gdk.Cursor() to create a cursor
with no pixels in it."
When I try to use it, I get an error:
>>> import gtk
>>> gtk.pygtk_version
(2, 4, 1)
>>> c = gtk.gdk.Cursor()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: Usage:
gtk.gdk.Cursor(cursor_type)
gtk.gdk.Cursor(display, cursor_type)
gtk.gdk.Cursor(display, pixbuf, x, y)
gtk.gdk.Cusrsor(source, mask, fg, bg, x, y)
>>>
Any idea on what's wrong? Is this not supported in 2.4.1? Is it a bug?
TIA,
Try:
pix = gtk.gdk.Pixmap(window, 1, 1, 1)
color = gtk.gdk.Color()
cursor = gtk.gdk.Cursor(pix, pix, color, color, 0, 0)
John
_______________________________________________
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/