Tk Source Code

View Ticket
Login
Ticket UUID: 1630251
Title: -endline is never displayed
Type: Bug Version: obsolete: 8.5a6
Submitter: treectrl Created on: 2007-01-08 03:08:07
Subsystem: 18. [text] Assigned To: fvogel
Priority: 7 High Severity: Minor
Status: Closed Last Modified: 2013-09-23 21:42:11
Resolution: Fixed Closed By: fvogel
    Closed on: 2013-09-23 21:42:11
Description:
According to the docs the -endline is the last line to be displayed, but it isn't. Setting -startline equal to -endline for example results in an empty widget.


pack [text .t] -side top -pady {0 6}
.t insert end "1\n2\n3\n"
pack [.t peer create .peer -startline 2 -endline 2] -side top


This does provide a way of having zero lines displayed, which may be a good thing rather than enforcing a minimum of 1 line, in which case only the docs need updating.
User Comments: fvogelnew1 added on 2012-05-29 03:49:11:

allow_comments - 1

fvogelnew1 added on 2012-05-29 03:48:51:
Merged in core-8-5-branch and in trunk.

fvogelnew1 added on 2012-05-18 01:47:15:
I have proposed a fix to the documentation in branch bug-1630251

fvogelnew1 added on 2012-01-17 21:40:12:
Despite I can't see the use case of it, it seems that the possibility of having -startline == -endline was intentional. There are some tests in text.tests running this case.

fvogelnew1 added on 2012-01-13 20:11:42:
I would say the documentation is wrong.
What would be the use case of having a text widget showing no line at all?