ScrollContainer
Inherits: Container < Control < CanvasItem < Node < Object
Inherited By: EditorInspector
Category: Core
Brief Description
A helper node for displaying scrollable elements (e.g. lists).
Properties
int | scroll_deadzone |
int | scroll_horizontal |
bool | scroll_horizontal_enabled |
int | scroll_vertical |
bool | scroll_vertical_enabled |
Methods
HScrollBar | get_h_scrollbar ( ) |
VScrollBar | get_v_scrollbar ( ) |
Theme Properties
StyleBox | bg |
Signals
- scroll_ended ( )
Emitted whenever scrolling stops.
- scroll_started ( )
Emitted whenever scrolling is started.
Description
A ScrollContainer node meant to contain a Control child. ScrollContainers will automatically create a scrollbar child (HScrollBar, VScrollBar, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a Panel control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension).
Property Descriptions
- int scroll_deadzone
Setter | set_deadzone(value) |
Getter | get_deadzone() |
- int scroll_horizontal
Setter | set_h_scroll(value) |
Getter | get_h_scroll() |
The current horizontal scroll value.
- bool scroll_horizontal_enabled
Setter | set_enable_h_scroll(value) |
Getter | is_h_scroll_enabled() |
If true
, enables horizontal scrolling.
- int scroll_vertical
Setter | set_v_scroll(value) |
Getter | get_v_scroll() |
The current vertical scroll value.
- bool scroll_vertical_enabled
Setter | set_enable_v_scroll(value) |
Getter | is_v_scroll_enabled() |
If true
, enables vertical scrolling.
Method Descriptions
- HScrollBar get_h_scrollbar ( )
- VScrollBar get_v_scrollbar ( )