This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pez
Recipients pez
Date 2018-05-28.10:39:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527503945.83.0.682650639539.issue33665@psf.upfronthosting.co.za>
In-reply-to
Content
tkinter.Scrollbar(orient='horizontal').fraction() gives you an accurate representation of how far along the mouse is in the trough. The output is 0.0 when the mouse is on the first pixel of the trough. The output is 1.0 when the mouse is on the last pixel of the trough.

tkinter.ttk.Scrollbar(orient='horizontal').fraction() believes the trough is 16 pixels shorter than it is. The output is 0.0 when the mouse is on the first pixel of the trough. However, the output is greater than 1.0 when the mouse is on the last pixel of the trough. This extra 16 pixels is static, so the behavior is the same regardless of how wide the scrollbar is.

While possibly coincidental, it's interesting that the 16 pixels is also close to the default width of the scrollbar.

This is happening for me on Windows 7.
Did not test vertical orientation.
History
Date User Action Args
2018-05-28 10:39:05pezsetrecipients: + pez
2018-05-28 10:39:05pezsetmessageid: <1527503945.83.0.682650639539.issue33665@psf.upfronthosting.co.za>
2018-05-28 10:39:05pezlinkissue33665 messages
2018-05-28 10:39:05pezcreate