Vlad Tudorache <[email protected]> added the comment:
Edit:
The code is:
import tkinter
root = tkinter.Tk()
text = tkinter.Text(root)
vbar = tkinter.Scrollbar(root)
vbar.pack(side=tkinter.RIGHT, fill=tkinter.Y)
text.pack(side=tkinter.LEFT, fill=tkinter.BOTH, expand=1)
text.config(yscrollcommand=vbar.set)
vbar.config(command=text.yview)
lines = ['This is the line number %d.\n' % i for i in range(256)]
text.insert(tkinter.END, ''.join(lines))
def click_trace(event):
text.insert('%d.%d' % (1, 0), 'Clicked at (%d,%d) on %s.\n' % (event.x,
event.y, vbar.identify(event.x, event.y)))
vbar.bind('<Button-1>', click_trace)
root.mainloop()
Clicking at the top on the slider shows that the Scrollbar considers it as
being on "through1" (in Tk the zone between the upper arrow and the "slider")
and NOT on the "slider". Please, play with the script (python3 tktest.py) and
see the results for yourselves.
----------
Added file: https://bugs.python.org/file47737/tktest.py
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34047>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com