ScrollView
A Scrollview contains a viewport that is bigger than the view and can be scrolled. It has scrollbar to interact with. The viewport-width and viewport-height are calculated automatically to create a scrollable view except for when using a for loop to populate the elements. In that case the viewport-width and viewport-height aren’t calculated automatically and must be set manually for scrolling to work. The ability to automatically calculate the viewport-width and viewport-height when using for loops may be added in the future and is tracked in issue #407.
Properties
enabled
(in bool): Used to render the frame as disabled or enabled, but doesn’t change behavior of the widget.has-focus
(in-out bool): Used to render the frame as focused or unfocused, but doesn’t change the behavior of the widget.viewport-width
andviewport-height
(in-out length): Thewidth
andlength
properties of the viewportviewport-x
andviewport-y
(in-out length): Thex
andy
properties of the viewport. Usually these are negativevisible-width
andvisible-height
(out length): The size of the visible area of the ScrollView (not including the scrollbar)vertical-bar-policy
andhorizontal-bar-policy
(in ScrollBarPolicy): The vertical and horizontal scroll bar visibility policy. The default value isScrollBarPolicy.as-needed
.
Callbacks
scrolled()
: Invoked whenviewport-x
orviewport-y
is changed by a user action (dragging, scrolling).