scrollbarDrag

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
scrollbarDrag <pNewPosition>
Associationsfield, group, scrollbar
Summary

Sent to a field, scrollbar, or group when the user drags the scrollbar thumb or when a text selection causes a field to scroll.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
pNewPosition

The new position of the scrollbar thumb. This parameter is passed only if the object is a scrollbar.

Example
on scrollbarDrag newValue -- display current line number
  put newValue div the textHeight of me + 1 into field "Line Number"
end scrollbarDrag
RelatedKeyword: field, scrollbar, selection
Property: selected
Message: scrollbarBeginning
Command: select, group
Glossary: scrollbar thumb, handle, handler, message, card, field, command
Description

Handle the scrollbarDrag message if you want to respond to the user dragging the scrollbar thumb: for example, to update a counter on the card.

If the user clicks one of the arrows or the gray region of the scrollbar, and the appropriate message is not handled anywhere in the message path, a scrollbarDrag message is sent. In other words, you can use a scrollbarDrag handler to handle all scrollbar movements.

If the select command is used to select text within a scrolling field, and this causes the field to scroll to bring the selected text into view, a scrollbarDrag message is sent to the field.

Tagsui