-
Notifications
You must be signed in to change notification settings - Fork 2
ScrollContainer
The ScrollContainer is an object that can add scrollbars to scroll its content if the content's size exceeds the boundaries of the ScrollContainer.
Extends Sheet
-
colour- The background colour. -
horizontal-bar- The colour of the horizontal bar tray. -
horizontal-bar.bar- The colour of the horizontal bar. -
horizontal-bar.active- The colour of the horizontal bar when held. -
vertical-bar- The colour of the vertical bar tray. -
vertical-bar.bar- The colour of the vertical bar. -
vertical-bar.active- The colour of the vertical bar when held.
ScrollContainer( number x, number y, number width, number height, Sheet element )
ScrollContainer( number x, number y, number width, number height )
ScrollContainer( Sheet element )Note, this element uses the
onPreDraw(),onPostDraw(), andonMouseEvent()callbacks of Sheet.
ScrollContainer.scrollX - number
The current horizontal offset.
ScrollContainer.scrollY - number
The current vertical offset.
ScrollContainer.horizontalPadding - number
The padding on the right side of the content.
ScrollContainer.verticalPadding - number
The padding on the bottom side of the content.
This method is chainable.
ScrollContainer self = ScrollContainer:setScrollX( number scroll )Sets the horizontal offset. Note that a positive value increases the scrolling (moves to the right).
This method is chainable.
ScrollContainer self = ScrollContainer:setScrollY( number scroll )Sets the vertical offset. Note that a positive value increases the scrolling (moves downward).
number width = ScrollContainer:getContentWidth()Returns the total width of the content, taking padding into account.
number height = ScrollContainer:getContentHeight()Returns the total height of the content, taking padding into account.
- Exception
- DynamicValueException
- ExpressionException
- IncorrectConstructorException
- IncorrectParameterException
- ParserException
- ResourceLoadException
- ThreadRuntimeException