Display height, in lines, of a logical line in a Tk text widget.
(text, index)
| 24 | |
| 25 | |
| 26 | def get_displaylines(text, index): |
| 27 | """Display height, in lines, of a logical line in a Tk text widget.""" |
| 28 | return text.count(f"{index} linestart", |
| 29 | f"{index} lineend", |
| 30 | "displaylines", return_ints=True) |
| 31 | |
| 32 | def get_widget_padding(widget): |
| 33 | """Get the total padding of a Tk widget, including its border.""" |