Scroll increment

Paul Hibbert paulhibbert at mac.com
Tue Dec 31 14:19:01 EST 2013


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





More information about the use-livecode mailing list