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

Re: GridView horizontal scrolling on touchscreens


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?
>>
>>
>>

Follow-Ups:
Re: GridView horizontal scrolling on touchscreensKevin Ritch <kevin@xxxxxxxxx>
References:
GridView horizontal scrolling on touchscreensKKing <kicking177@xxxxxxxxx>
Re: GridView horizontal scrolling on touchscreensBruce Steers <bsteers4@xxxxxxxxx>