Scroll Elements#
Scrollview elements allow large elements to be displayed in a smaller area by providing scroll bars. A scrollview only has a single child element, layout elements like boxes or grids should be used to create complex content.
A new scrollview can be created with the scrollview()
function in the
eg-overlay-ui
module.
Functions#
- eg-overlay-ui.scrollview()#
Create a new
uiscrollview
.Version History
Version
Notes
0.3.0
Added
Classes#
- class eg-overlay-ui.uiscrollview#
A scrollview allows a large UI element to be displayed in a small area using scrollbars.
- child(element)#
Set the child element of this scrollview.
- Parameters:
child (
uielement
)
Version History
Version
Notes
0.3.0
Added
- scrolly([value])#
Get or set the Y scroll position.
- Parameters:
value (
number
) – (Optional) The Y position to scroll to, as a value between 0.0 (the top) and 1.0 (the bottom).- Returns:
A number if
value
is not specified ornil
.
Version History
Version
Notes
0.3.0
Added
Note
The following methods are inherited from
uielement
- x([position])#
Set or get the current position X.
Important
It is normally not necessary to manually position an element.
Version History
Version
Notes
0.3.0
Added
- y([position])#
Set or get the current position Y.
Important
It is normally not necessary to manually position an element.
Version History
Version
Notes
0.3.0
Added
- width([value])#
Get or set the element’s width.
Important
It is normally not necessary to manually set an element’s size.
Version History
Version
Notes
0.3.0
Added
- height([value])#
Get or set the element’s height.
Important
It is normally not necessary to manually set an element’s size.
Version History
Version
Notes
0.3.0
Added