tkinter entry index

Fredrik Lundh fredrik at pythonware.com
Mon Mar 12 18:12:50 EST 2001


"dsavitsk" wrote:
> how can i get the position of the cursor in an entry widget? .index and
> .icursor don't seem to it. That is, if "foo" is in an entry, and the cursor
> is between the "o" and the other "o", I could get a return of 2.

    position = w.index(INSERT)

Cheers /F

<!-- pythonworks 1.2 coming soon:
http://www.pythonware.com/products/works/index.htm
-->





More information about the Python-list mailing list