API:VerticalScrollbarSetMaxScrollPosition
From RoR Wiki
UI Lua API · Scrollbar functions
Version: WAR 1.4.8
Sets the maximum scroll position (the total length of the scrolled content) of a VerticalScrollbar.
VerticalScrollbarSetMaxScrollPosition(scrollbarName, maxPosition)
Arguments
- scrollbarName
string– Name of the VerticalScrollbar.- maxPosition
number– New maximum.
Returns
Nothing.
Details
- If
maxPositionis smaller than the page size, the page size is used instead. - The page size and the line size are not changed.
- The thumb is resized for the new range and the current position is clamped again. If that moves the position, the
OnScrollPosChangedhandler runs. - The stock UI never calls this function.
- The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.
Errors
The error messages use the name of VerticalScrollbarSetScrollPosition:
Error in function call 'VerticalScrollbarSetScrollPosition': Window %s does not existError in function call 'VerticalScrollbarSetScrollPosition': Window %s is not a VerticalScrollbar
Example
A minimal example built from the signature:
VerticalScrollbarSetMaxScrollPosition( "MyScrollbar", 500 )
