Menu

#3067 cocoa <Mousewheel> event incorrect %x %y substitutions

current: 8.6.0
open
69. Events (88)
5
2013-02-14
2013-02-14
Anonymous
No

The cocoa 8.6.0 is returning incorrect %x and %y substitutions.
It is returning the value relative to the parent of the window, not relative to the window.

test code:
grid [label .my -textvariable mousey] -row 1 -column 1
grid [label .wy -textvariable wheely] -row 1 -column 2
grid [label .by -textvariable buttony] -row 1 -column 3
grid [frame .f -width 150 -height 200] -row 2 -column 1 -columnspan 3
bind .f <Any-MouseWheel> "set wheely %y"
bind .f <Any-Motion> "set mousey %y"
bind .f <ButtonPress> "set buttony %y"

move the mouse in the frame to see the correct %y substitution.
press the button to see that it is returning the same value.
move the mouse wheel and see that it's not correct.
% x substitution has the same problem.

Discussion

MongoDB Logo MongoDB