[Tkinter-discuss] Canvas cursor position

Vasilis Vlachoudis Vasilis.Vlachoudis at cern.ch
Sat Nov 18 23:29:35 CET 2006

Dear all,

in my application I am using editable text items inside a Canvas with 
the Canvas.create_text().
My problem is how to find the position (x,y) of the insert cursor from 
an editable text item in a canvas, so when the cursor
goes out of the window to scroll the canvas to see the cursor?
While I can set the cursor with Canvas.icursor(item,"@%d,%d"%(x,y)), I 
cannot get back the x,y position with the function Canvas.index(item, 
index). It returns only a numerical index of the cursor position.


More information about the Tkinter-discuss mailing list