API:HorizontalScrollbarSetMaxScrollPosition
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 HorizontalScrollbar.
HorizontalScrollbarSetMaxScrollPosition(scrollbarName, maxPosition)
Arguments
- scrollbarName
string– Name of the HorizontalScrollbar.- 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 HorizontalScrollbarSetScrollPosition:
Error in function call 'HorizontalScrollbarSetScrollPosition': Window %s does not existError in function call 'HorizontalScrollbarSetScrollPosition': Window %s is not a HorizontalScrollbar
Example
A minimal example built from the signature:
HorizontalScrollbarSetMaxScrollPosition( "MyScrollbar", 500 )
