Am 27.05.20 um 19:09 schrieb
tedbr...@gmail.com:
> On Tuesday, May 26, 2020 at 11:35:19 PM UTC-7, Harald Oehlmann wrote:
>
>>
>> Switching may be done like (untested sketch)
>> bind $w <ScrollWheel> break
>>
>
> On my windows system, it appears to be <MouseWheel> that can disable it.
>
> I think I will submit a ticket for the manual page but I'm not sure what category to use for the ticket besides "other" or [spinbox] and type of "support" seems closest. Or is there a better way to report on the manual?
>
> I think something like this would be useful (if I got this right)
>
>
> xxxxxxxx
>
> Default Bindings
>
> Being an extended ttk::entry widget, ttk::spinbox includes all the default bindings mentioned in ttk::entry, plus the following:
>
> 1. Mouse wheel rotates are the same as pressing <Up> and <Down>. In addition, a mouse with a tilt wheel found on some hardware acts like a shift rotate.
What do you mean by "a mouse with a tilt wheel found on some hardware"?
Nowadays the scroll wheel of most mice is tiltable. However, tilting
the wheel left or right will only trigger a <Shift-MouseWheel> event on
Windows and Mac OS X Aqua or a <Shift-Button-4|5> event on X11 if the
mouse has 4 or 5 buttons (including the scroll wheel). Since the
TSpinbox class has no bindings for <Shift-MouseWheel> or
<Shift-Button-4|5>, these events will be handled just like the
corresponding ones w/o Shift, i.e., they have the same effect as
pressing <Up> and <Down>.
>
> If this is not desired, the following can be used for a ttk::spinbox named .spin to disable this behavior:
>
> bind .spin <MouseWheel> break
>
> The following will leave the mouse wheel rotate active but disable the tilt-wheel or the wheel with the shift key down.
>
> bind .spin <Shift-MouseWheel> break
>
> 2... (if there's any others that differ from ttk::entry)
>
> xxxxx
>
> This might also be a good place to mention the <MouseWheel>'s unique focus talent and perhaps mention tip 171. I didn't see it discussed in [focus] and I'm not sure where else it might be in the manual.
>
IMHO, TIPs should not be mentioned in manual pages. In addition, notice
that TIP 171 proposed to change the default <MouseWheel> bindings in
such a way that they scroll what the mouse is over, not what has the
focus. Instead of implementing this TIP, the Tk developers changed the
C code in such a way that on Windows, too, the mouse wheel events are no
longer reported to the widget having the focus, but to the one under the
pointer. That is, not the *handling* of the <MouseWheel> events was
changed, but the *reporting* of these events. This made TIP 171
obsolete, and IMHO, it was a good decision.