| Description: |
I'm developing small script with tkinter, but this seems to be original Tk behavior, and quite undesirable at that.
With wrap=none .text xview returns fractions based on visible lines rather than the longest one. This makes horizontal scrollbar act weird when scrolling vertically.
See this Stackoverflow question:
http://stackoverflow.com/questions/35412972/tkinters-text-with-wrap-none-cannot-be-scrolled-horizontally-for-more-than-a-wi
|
| User Comments: |
fvogel added on 2016-03-06 20:31:00:
As noted in the stackoverflow question, this is documented in the [text] man page:
pathName xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the portion of the document's horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the text is off-screen to the left, the middle 40% is visible in the window, and 40% of the text is off-screen to the right. The fractions refer only to the lines that are actually visible in the window: if the lines in the window are all very short, so that they are entirely visible, the returned fractions will be 0 and 1, even if there are other lines in the text that are much wider than the window.
Therefore this ticket is an RFE, not a bug.
Knowing the implementation of the text widget, changing this is going to be very hard if we don't want to kill performance.
Patches most welcome...
|