Message317836
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. |
|
Date |
User |
Action |
Args |
2018-05-28 10:39:05 | pez | set | recipients:
+ pez |
2018-05-28 10:39:05 | pez | set | messageid: <1527503945.83.0.682650639539.issue33665@psf.upfronthosting.co.za> |
2018-05-28 10:39:05 | pez | link | issue33665 messages |
2018-05-28 10:39:05 | pez | create | |
|