James Stroud wrote:
> I would like to get the index of the character closest to the pointer in a
> Text, something like Canvas.find_closest(). I want it to bind to '<Motion>'.
> Does anybody know how this might be done?
use w.index("@x,y" % (event.x, event.y)) to find the character "under" the
pointer, and, if necessary, use w.bbox() and/or w.dlineinfo() on neighbouring
characters/lines to find the "closest" (depending on your definition of
closest).
</F>
--
http://mail.python.org/mailman/listinfo/python-list