Alternatively you could use a "send in time" message at the beginning of
scrollBarDrag that polls for the mouse state:
-- Script of the field
local sIsScrolling
on scrollbarDrag
if sIsScrolling <> "true" then
put "true" into sIsScrolling
send "CheckMouse" to me in 10 milliseconds
end if
:
end scrollbarDrag
on CheckMouse
if the mouse is up then
put false into sIsScrolling
put the vScroll of me into tVScroll
-- do your thing
else
send "CheckMouse" to me in 10 milliseconds
end if
end CheckMouse
Ken
> On Feb 2, 2026, at 10:11 AM, Bob Sneidar via use-livecode
> <[email protected]> wrote:
>
> You can set a variable when the drag starts, then in an idle handler, check
> for the state of the variable and proceed accordingly.
>
> Bob S
>
>
>> On Feb 2, 2026, at 7:54 AM, Craig Newman via use-livecode
>> <[email protected]> wrote:
>>
>> Sorry, I missed the part about doing this in a field. That message is not
>> sent from a field, only from a scrollbar sort of control.
>>
>> In fact, very little indeed is sent from the scrollbar of a field. It may be
>> necessary to trap the
>> mouseLeave” message from a transparent rectangular graphic overlying the
>> scrollbar portion of the field. This may be a close as you can get to
>> noticing the terminatiion of the scroll process, and it is not pretty.
>>
>> Craig
>>
>>> On Feb 1, 2026, at 5:29 PM, David Epstein via use-livecode
>>> <[email protected]> wrote:
>>>
>>> The scrollBarDrag message is sent while the mouse is down. If I want to
>>> know when the drag has ended, I can trap mouseUp in a scrollbar control.
>>> But this does not seem to work for a scrolling field. Is there a good way
>>> to learn the vScroll of a field when the mouse on the field’s scrollbar has
>>> been released?
>>>
>>> David Epstein
>>> _______________________________________________
>>> use-livecode mailing list
>>> [email protected]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> [email protected]
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode