[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GridView horizontal scrolling on touchscreens


I like to add scroll arrows on buttons, but it's a personal choice.

On 2026-08-12 6:48 pm, Bruce Steers wrote:

sorry that code is flawed,it's not so easy because the scroll position does not seem to relate well to mouse position.

Does it not scroll when you use 2 fingers? many touchscreens scroll if 2 fingers are used.

I can get it working nicely by noting the scroll position at mouse down and using that...

Public Sub GridView1_MouseDown()

Last.Tag = Last.ScrollX  ' make a note of ScrollX at mouse down time

End

Public Sub GridView1_MouseDrag()

Last.ScrollX = Last.Tag + Mouse.StartX - Mouse.X

End

Respects
BruceS

On Wed, 12 Aug 2026 at 08:02, Bruce Steers <bsteers4@xxxxxxxxx> wrote:

Maybe you want something like this...

Public Sub GridView1_MouseDrag()

GridView1.Scroll((Mouse.StartX - Mouse.X), GridView1.ScrollY)

End

Or to control up and down too....

Public Sub GridView1_MouseDrag()

GridView1.Scroll(Mouse.StartX - Mouse.X, Mouse.StartY - Mouse.Y)

End

Respects
BruceS

On Wed, 12 Aug 2026, 04:00 KKing, <kicking177@xxxxxxxxx> wrote: I'd like users to be able scroll horizontally by dragging on Gridview
cell left or right is this possible?

References:
GridView horizontal scrolling on touchscreensKKing <kicking177@xxxxxxxxx>
Re: GridView horizontal scrolling on touchscreensBruce Steers <bsteers4@xxxxxxxxx>
Re: GridView horizontal scrolling on touchscreensBruce Steers <bsteers4@xxxxxxxxx>