How do I enable scrolling of a group ?
Alex Tweedly
alex at tweedly.net
Sun Feb 21 17:18:18 EST 2016
On 21/02/2016 14:21, [-hh] wrote:
> **** "Doing Touch scroll by rawkeyDown" ****
> will be interesting for a lot of readers. Would be great if you share
> your solution with a script snippet at the end of this thread ...
>
>
Sure - though it turns out to be so trivial a snippet it's almost
embarrassing :-)
I haven't figured out a way to tell what the correct step size should be
(whether to vary it by formattedsize vs actualsize, or ....), so I
guessed a fixed figure, and it seems OK for all the (smallish number) of
cases I've tried.
-- Scroll a group according to touch (e.g. two-finger movement on Mac
OSX trackpad)
constantkVStep = 10, kHstep = 10
on rawKeyDown p
switch p
case 65308
setthevscrollofmetothevscrollofme+ kVStep
break
case 65309
setthevscrollofmetothevscrollofme- kVStep
break
case 65310
setthehscrollofmetothehscrollofme+ kHStep
break
case 65311
setthehscrollofmetothehscrollofme- kHStep
break
default
end switch
end rawKeyDown
Thanks again to everyone who helped.
-- Alex.
More information about the use-livecode
mailing list