What are the Tkinter events for horizontal edge scrolling (in Linux)?

后端 未结 2 1434
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 08:32

I have a Python Tkinter Text widget with scrollbars. I would like to define my own method for using horizontal edge scrolling on my laptop\'s touchpad. However, I don\'t kno

2条回答
  •  清酒与你
    2020-12-22 09:21

    I investigated code relating to printing general events, made code to do that for button presses (not just key presses) and I saw what event.num is for the horizontal mousewheel. So, I did the following solution:

    I don't think there are event names for horizontal mouse scrolling (tell me if I'm wrong), but there do appear to be event numbers (which are 6 for scrolling left and 7 for scrolling right). While "" and "" don't seem to work, horizontal edge scrolling is still possible in Tkinter in Python 3.5.3 on Linux (I haven't tested anything else).

    You'll need to bind "

提交回复
热议问题