|
From: Brad L. <bra...@gm...> - 2018-06-29 14:13:39
|
On Thu, Jun 28, 2018 at 11:39 PM, Harald Oehlmann <
har...@el...> wrote:
> Am 29.06.2018 um 08:17 schrieb Brad Lanam:
> > Does someone have a touchpad on windows with horizontal scrolling
> enabled?
> > And can test in Tk whether the horizontal scroll creates a <MouseWheel>
> > event?
> > And also test whether the horizontal scroll works when there is a
> > horizontal scrollbar active.
> >
> > I have a touchpad on the laptop with Linux, but the horizontal scroll
> > does not work in a Windows VM.
> > This may very well be due to the VirtualBox mouse device driver.
> >
> > The tilt-wheel on the Logitech G500 mouse did not create a <MouseWheel>
> > event.
> > I will test the tilt-wheel further on Windows tomorrow and see if Tk
> > handles it at all.
>
> I have a touchpad and it works in Notepad wether in x or y.
> - if I move with two fingers to left-right -> x-scroll
> - If I move with two fingers up-down -> y-scroll
> - If I try an angle, it chooses x or y. I have to release the fingers to
> change direction.
>
> Tk:
> pack [text .e] -fill both -expand true
> bind .e <MouseWheel> "puts MW%D"
> bind .e <Button-4> "puts B4"
> bind .e <Button-5> "puts B5"
>
> Mouspad Gesture up/down: MW120 / MW-120
> Mousepad gesture left/right: no reaction
>
>
The tilt-wheel on the Logitech G500 does not work for horizontal scrolling
within Tcl/Tk.
It does work within firefox.
I'm on Windows 10, so I would need one of those message spy programs that
works there.
- Horizontal scrolling does not work in Linux (touchpad).
The horizontal scroll on the touchpad sends button-6/7 as expected.
A tilt-wheel also sends buttons-6/7.
- Horizontal scrolling does not work in Windows (tilt-wheel, touchpad
assumed not to work),
despite their being some sort of code to handle WM_HSCROLL in the windows
scrollbar code.
- A <MouseWheelHoriz> event needs to be added.
package require Tk
ttk::scrollbar .hsb -orient horizontal -command [list .t xview]
ttk::scrollbar .vsb -orient vertical -command [list .t yview]
text .t \
-xscrollcommand [list .hsb set] \
-yscrollcommand [list .vsb set] \
-wrap none \
-height 5
grid .t -row 0 -column 0 -sticky nsew
grid .vsb -row 0 -column 1 -sticky ns
grid .hsb -row 1 -column 0 -sticky ew
grid columnconfigure . 0 -weight 1
grid rowconfigure . 0 -weight 1
for {set i 0} {$i < 10} {incr i} {
.t insert end [string repeat {aaa bbb ccc ddd} 20]
.t insert end "\n"
}
|