Can I Stop Non-List Fields From Scrolling?

Richard Gaskin ambassador at fourthworld.com
Wed Jun 13 16:39:52 EDT 2007


Gregory Lypny wrote:
> I've noticed that non-list fields without scroll bars still scroll up  
> and down when I move the scroll ball on my Mighty Mouse.  They even  
> move a little when there is only one line of data in the field and  
> only one line visible.
> 
> Is there any way to stop this?  A client can inadvertently move the  
> contents of a field out of sight without knowing it, and not know how  
> to get it back.

Normally any field whose contents extend beyond the visible bounds of 
the object will be scrolled in response to a mouse scroll wheel.

The rawKeyDown message is sent when the scroll wheel is used, so you can 
trap the appropriate values (65308 is "scroll down" and 65309 is "scroll 
up") to prevent scrolling:

on rawKeyDown k
   if k is not in "65308,65309" then pass rawKeyDown
end rawKeyDown

But maybe even simpler would be to remove the empty lines from the 
bottom of the field text.

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list