Community snippets

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Community snippets

Post by [-hh] » Sun Mar 01, 2020 6:48 pm

[#55] LCB snippet: How to use the scrollWheel

As this is very uncompletely documented here some detailed info.
Works in LC 8/9:

Code: Select all

--> deltaX is the horizontal scroll
--> deltaY is the vertical scroll
--> deltaX and deltaY are -1 or 1 (or 0)

public handler OnMouseScroll(deltaX, deltaY)
  log [deltaX, deltaY]
end handler

--> on a mouse with vertical scroll only the
--> horizontal scroll is triggered with Shift
[p.s. LCB snippet #54 is NSWindow Ref (by shaosean, see last post)]
shiftLock happens

Post Reply

Return to “LiveCode Builder”