Fredrik Arnerup wrote:
Hi,

Is it possible to change the mouse cursor of a TextView?
This does not appear to have any effect:

w = Window()
v = TextView(); w.add(v)
w.show(); v.show()
v.window.set_cursor(gdk.Cursor(gdk.HAND2))
v.window.get_children()[0].set_cursor(gdk.Cursor(gdk.HAND2))

You need to do this instead:


v.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND2))

This is because the textview is made up of several windows. The actual text window already has a cursor set on it (the i-beam cursor), so changing the cursor of its parent window has no effect.

--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to