How do I enable scrolling of a group ?

Alex Tweedly alex at
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
     case 65309
setthevscrollofmetothevscrollofme- kVStep
case 65310
setthehscrollofmetothehscrollofme+ kHStep
     case 65311
setthehscrollofmetothehscrollofme- kHStep
   end switch
end rawKeyDown

Thanks again to everyone who helped.
-- Alex.

More information about the use-livecode mailing list