Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idle: scroll Text faster with mouse wheel #69203

Closed
terryjreedy opened this issue Sep 6, 2015 · 7 comments
Closed

Idle: scroll Text faster with mouse wheel #69203

terryjreedy opened this issue Sep 6, 2015 · 7 comments
Assignees
Labels
3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 25015
Nosy @terryjreedy, @roseman, @serhiy-storchaka
Superseder
  • bpo-33664: IDLE: scroll text by lines, not pixels.
  • Files
  • MouseWheelTrace.tcl
  • MouseWheelTrace.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2018-05-28.00:52:49.391>
    created_at = <Date 2015-09-06.19:16:05.676>
    labels = ['expert-IDLE', 'type-feature', '3.7']
    title = 'Idle: scroll Text faster with mouse wheel'
    updated_at = <Date 2018-05-28.00:52:49.389>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2018-05-28.00:52:49.389>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2018-05-28.00:52:49.391>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2015-09-06.19:16:05.676>
    creator = 'terry.reedy'
    dependencies = []
    files = ['40385', '40386']
    hgrepos = []
    issue_num = 25015
    keywords = []
    message_count = 7.0
    messages = ['250013', '250026', '250073', '250078', '250079', '296411', '317820']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'markroseman', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = '33664'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue25015'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    https://stackoverflow.com/questions/32414942/python-scroll-speed
    At least on Win7, tk.Texts scroll, by default, at an anemic 2-3 lines per wheel click, ignoring the system wheel setting. What happens on other systems? I consider this a probable tk bug, at least on Widows, but we can override the default (on Windows) with

    def mousescroll(event):
       <scroll n lines>
       return 'break'
    text.bind('<MouseWheel>', mousescroll)

    turtledemo.__main__ has wheel code (for font resizing) for Windows, Linux, and Mac. Unless we can access system settings, we might add a config option.

    @terryjreedy terryjreedy added the type-feature A feature request or enhancement label Sep 6, 2015
    @serhiy-storchaka
    Copy link
    Member

    On X Window the scroll step in text widget is constant (50 pixels). On Windows and Mac OS it should depend on mouse settings.

    Run with, execute

    bind . <MouseWheel> {puts %D}
    

    and try to roll mouse wheel on Tk window with different speed and settings.

    @terryjreedy
    Copy link
    Member Author

    The SO OP reported Idle Shell and Editor behavior. I retested minimal tk.Text(root).pack(), eliminating Idle as a factor, before and after changing system lines setting from 3 to 9, and got the constant same behavior. The now too small 50 pixels seems about what it is doing.

    Serhiy, I do not understand your 'Run ...' sentence.

    @serhiy-storchaka
    Copy link
    Member

    You can measure your mouse speed with following pure Tcl/Tk script.

    @serhiy-storchaka
    Copy link
    Member

    Or with following Python script.

    @terryjreedy terryjreedy self-assigned this Jun 19, 2017
    @serhiy-storchaka
    Copy link
    Member

    Serhiy, I do not understand your 'Run ...' sentence.

    Sorry, there was a typo in my sentence. I meant "Run the program 'wish' and enter the following command".

    @terryjreedy
    Copy link
    Member Author

    This is 'out of date' in the sense that I have decided that the root problem is scrolling by pixels instead of lines. Once we do the latter, for bpo-33664, we can just scroll by, say, 5 lines instead of 3, which I think is sufficient.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants