If we need to incrementally work through the lines of a text widget we can obtain the content sixe in terms of lines and characters using: index end This will, however return a a value such as 5.5, ie. five lines '.' and five characters. If we just need the lines, and not the characters, (eg. in an incremented loop) then the following proc is always handy. #--------------- # return actual number of lines in a text widget #--------------- proc _lines {t} { return [expr [lindex [split [$t index end] .] 0] -1] } #--------------- # test it #--------------- proc demo {} { catch {console show} pack [text .txt] .txt insert end "1\n2\n3\n4\n5" puts [_lines .txt] } demo