[issue37902] Add scrolling for IDLE browsers

George Zhang report at bugs.python.org
Wed Aug 21 12:44:49 EDT 2019


George Zhang <geetransit at gmail.com> added the comment:

I looked at the code for scrolling and moved it over to the ScrolledCanvas and TreeNode (because it uses a Label that sits on the canvas, meaning we have to rebind it here).

I haven't figured out how to add the scroll-by-pressing-down-and-moving way but I'll look further into it.

About the factoring out part, the ScrolledCanvas and TreeNode are both used by the two browsers, meaning that no code has to be added to them. In the future, a factory function could be made that when called with a canvas, it returns an event callback function that can be bound to the canvas. When called, it scrolls depending on the event type and other info.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37902>
_______________________________________


More information about the Python-bugs-list mailing list