Unfortunately, it returns the lines as defined in the original contents, not in the wrapped form:
That makes sense, wrapping doesn't count -- it appears there is no way to retrieve the position of the wraps. You can get the space (in pixels) a line takes up with https://metacpan.org/module/Tk::Text#text-dlineinfo-index but that's about it
In reply to Re^3: TK-Text Get text per row (dlineinfo)
by Anonymous Monk
in thread TK-Text Get text per row
by kean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |