Mouse wheel scrolling support...

Richmond Mathewson richmondmathewson at gmail.com
Mon Mar 19 20:18:32 CET 2018


At the risk of sounding both naive and stupid I have just pasted a large 
text into a field
with a vertical scrollBar in a field in a stack in LC 7.1.4 on Mac OS 
10.7.5.

With the "blobby thing" that passes for a scroll wheel on my A1152 Apple 
mouse
I am able to scroll up and down in the field with no trouble at all.

So, would be glad if you could explain in a bit more detail what you mean
by "supporting scrolling fields by use of a mouse wheel".

Richmond.

On 19/3/2018 8:49 pm, J. Landman Gay via use-livecode wrote:
> On 3/19/18 11:15 AM, Paul Dupuis via use-livecode wrote:
>> Does anyone have any code for supporting scrolling fields by use of a
>> mouse wheel that they would care to post or email me?
>
> From my cribbed collection:
>
> on rawKeyDown pKeyNumber
>   if pKeyNumber is 65308 then put 15 into tScrollInc -- 
> increaseScroll, scroll wheel down
>   else if pKeyNumber is 65309 then put -15 into tScrollInc -- 
> decreaseScroll, scroll wheel up
>   if tScrollInc is empty then pass rawKeyDown
>   set the vScroll of me to (the vScroll of me + tScrollInc)
> end rawKeyDown
>
> -- both vertical and horizontal:
>
> on rawKeyDown pKey
>   switch pKey
>     case 65309
>       set the vScroll of me to the vScroll of me - 30
>       break
>     case 65308
>       set the vScroll of me to the vScroll of me + 30
>       break
>     case 65311
>       set the hScroll of me to the hScroll of me - 30
>       break
>     case 65310
>       set the hScroll of me to the hScroll of me +30
>       break
>     default
>       pass rawKeyDown
>   end switch
> end rawKeyDown



More information about the use-livecode mailing list