Run when the scroll frame's scroll position is changed. Only run when the scroll position changes due to changes in the scroll child frame's dimensions, not when :SetHorizontalScroll()
or :SetVerticalScroll()
is called.
Signature:
OnScrollRangeChanged(self,
xOffset,
yOffset)
Arguments:
self
- Reference to the widget for which the script was run (scrollframe
)xOffset
- New horizontal scroll range (in pixels, measured from the leftmost scroll position) (number
)yOffset
- New vertical scroll range (in pixels, measured from the topmost scroll position) (number
)
Examples:
-- Set the min and max values of a scroll bar (Slider) based on the scroll range scrollFrame:SetScript("OnScrollRangeChanged", function(self, x, y) verticalScrollBar:SetMinMaxValues(0, y) end)