Pergunta

Is there some method which tells you the line number and column number of a Text widget in Perl/Tk?

Foi útil?

Solução

According to the documentation, the widget has a method index() which returns the "line.char" of various positions in the widget. Pass it the name of the special mark "insert" to get the current position of the insertion cursor. Pass it the name of the special mark "current" to get the current position on the mouse.

Your question doesn't make it clear which of the two you want.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top