request current position (as a index) in a text-widgetgreenspun.com : LUSENET : Tool Command Language (Tcl) : One Thread |
I have made a text-widget with several lines en coloms and I want to check te input form keyboard inserted in the tekst-widget. If the inserted text in not allowed I want to correct this. Therefor I need to know the position of the last inserted character. Is is possible to get de current position as an index (line.char) of the last character inserted in text-widget from a keyboard and how can this be done ?How can indices converted to screen-units and screen-units to indices ?
-- Martin Weterings (c.m.j.weterings@dzl.rws.minvenw.nl), December 13, 1999
Unfortunately, I don't know much about the text widget. And unfortunately this board doesn't get much activity, so I don't know how soon an answer is going to appear. However, you might ask the same question (perhaps with some sample code?) over on http://purl.org/thecliff/tcl/wiki/ and see if an answer appears.
-- Larry W. Virden (lvirden@cas.org), December 13, 1999.