문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top