Scroll increment

John john at onechip.com
Tue Dec 31 15:38:05 EST 2013


   I was hoping there was something I was missing (a property for instance) that set the “scroll increment” but it looks there isn’t.  I will try to roll my own to try and get closer to a native feel.  If it works out I will report back to the list.

Jaque,

I am using a magic mouse as well.  It wasn’t how fast the field scrolled (that is proportional to my finger speed), it was how finely grained the scrolling is.  When moving my finger slowly on a tall field (1000 px high) the field jumps in 10 text line increments.  On a short field (100 px high) the field jumps one line at a time.  Using a native app (Preview for instance) there is no “jumping” behavior at all.  Testing with a “click wheel” mouse on a native app does result in discrete jumps, one for every click.


Paul,

Thanks much for the head start, I will start with what you have and see if I can add accelerated scrolling in the like.


Thanks,
John


On Dec 31, 2013, at 11:19 AM, Paul Hibbert <paulhibbert at mac.com> wrote:

> Jacque,
> 
> Same issues with different mice (here at least).
> 
> John,
> 
> You could try setting the scroll rate yourself, I tried the following scripts and it worked, but I didn't have time to figure out the accelerated scrolling that users may expect…
> 
> -- Add this command to the script of each scrolling field
> on rawKeyDown pKey
>   put the long name of me into tField
>   scrollRatePref pKey,tField
> end rawKeyDown
> 
> -- Add this command to your stack or card script
> command scrollRatePref pKey,pField
>   -- Add a temporary scrollBar to make testing easier, then just hard code tScrollRate
>   -- when you find the value that suits you, or set it up as a user preference. Try a value of 8 for starters.
> 
>   put the thumbPos of sb "tempScrollRate" into tScrollRate
> 
>   if pKey = "65308" then set the vScroll of pField to the vScroll of pField + tScrollRate -- Scrolls down
>   if pKey = "65309" then set the vScroll of pField to the vScroll of pField - tScrollRate -- Scrolls Up
> 
> end scrollRatePref
> 
> If your field scrolls horizontally, 65310 scrolls right & 65311 scrolls left.
> 
> There are probably many better ways and lots more options, but this demonstrates the point.
> 
> Paul
> 
> 
> On 2013-12-31, at 10:39 AM, J. Landman Gay <jacque at hyperactivesw.com> wrote:
> 
>> On 12/30/13 11:52 PM, John wrote:
>>> 
>>> The standard scrolling field in liveCode supports the a mouse scroll
>>> wheel.  What is a bit unusual is that the height of the field
>>> dictates how far the field “hops” as you scroll. In short fields (50
>>> high) the field “jumps” in ½ character height increments (assuming
>>> the default font and size are used).  In 100 high fields it is one
>>> line at a time increasing to 10 lines at a time when the field is
>>> 1000 high.
>> 
>> I think this may depend on your mouse and the OS. On my Mac using a magic mouse the amount of scroll depends on how fast I move my finger. On a mouse with a fixed scroll wheel it's probably different and may depend on the number of messages the scroll wheel sends for each change.
>> 
>> I'm just guessing, so it would be interesting to see if you get different results with a different mouse.
>> 
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list