123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the ScrollContainer.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_ScrollContainer:
- ScrollContainer
- ===============
- **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`EditorInspector<class_EditorInspector>`
- **Category:** Core
- Brief Description
- -----------------
- A helper node for displaying scrollable elements (e.g. lists).
- Properties
- ----------
- +-------------------------+--------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`scroll_deadzone<class_ScrollContainer_property_scroll_deadzone>` |
- +-------------------------+--------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`scroll_horizontal<class_ScrollContainer_property_scroll_horizontal>` |
- +-------------------------+--------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`scroll_horizontal_enabled<class_ScrollContainer_property_scroll_horizontal_enabled>` |
- +-------------------------+--------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`scroll_vertical<class_ScrollContainer_property_scroll_vertical>` |
- +-------------------------+--------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`scroll_vertical_enabled<class_ScrollContainer_property_scroll_vertical_enabled>` |
- +-------------------------+--------------------------------------------------------------------------------------------+
- Methods
- -------
- +-------------------------------------+----------------------------------------------------------------------------------+
- | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scrollbar<class_ScrollContainer_method_get_h_scrollbar>` **(** **)** |
- +-------------------------------------+----------------------------------------------------------------------------------+
- | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scrollbar<class_ScrollContainer_method_get_v_scrollbar>` **(** **)** |
- +-------------------------------------+----------------------------------------------------------------------------------+
- Theme Properties
- ----------------
- +---------------------------------+----+
- | :ref:`StyleBox<class_StyleBox>` | bg |
- +---------------------------------+----+
- Signals
- -------
- .. _class_ScrollContainer_signal_scroll_ended:
- - **scroll_ended** **(** **)**
- Emitted whenever scrolling stops.
- ----
- .. _class_ScrollContainer_signal_scroll_started:
- - **scroll_started** **(** **)**
- Emitted whenever scrolling is started.
- Description
- -----------
- A ScrollContainer node meant to contain a :ref:`Control<class_Control>` child. ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar<class_HScrollBar>`, :ref:`VScrollBar<class_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 :ref:`Panel<class_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
- ---------------------
- .. _class_ScrollContainer_property_scroll_deadzone:
- - :ref:`int<class_int>` **scroll_deadzone**
- +----------+---------------------+
- | *Setter* | set_deadzone(value) |
- +----------+---------------------+
- | *Getter* | get_deadzone() |
- +----------+---------------------+
- ----
- .. _class_ScrollContainer_property_scroll_horizontal:
- - :ref:`int<class_int>` **scroll_horizontal**
- +----------+---------------------+
- | *Setter* | set_h_scroll(value) |
- +----------+---------------------+
- | *Getter* | get_h_scroll() |
- +----------+---------------------+
- The current horizontal scroll value.
- ----
- .. _class_ScrollContainer_property_scroll_horizontal_enabled:
- - :ref:`bool<class_bool>` **scroll_horizontal_enabled**
- +----------+----------------------------+
- | *Setter* | set_enable_h_scroll(value) |
- +----------+----------------------------+
- | *Getter* | is_h_scroll_enabled() |
- +----------+----------------------------+
- If ``true``, enables horizontal scrolling.
- ----
- .. _class_ScrollContainer_property_scroll_vertical:
- - :ref:`int<class_int>` **scroll_vertical**
- +----------+---------------------+
- | *Setter* | set_v_scroll(value) |
- +----------+---------------------+
- | *Getter* | get_v_scroll() |
- +----------+---------------------+
- The current vertical scroll value.
- ----
- .. _class_ScrollContainer_property_scroll_vertical_enabled:
- - :ref:`bool<class_bool>` **scroll_vertical_enabled**
- +----------+----------------------------+
- | *Setter* | set_enable_v_scroll(value) |
- +----------+----------------------------+
- | *Getter* | is_v_scroll_enabled() |
- +----------+----------------------------+
- If ``true``, enables vertical scrolling.
- Method Descriptions
- -------------------
- .. _class_ScrollContainer_method_get_h_scrollbar:
- - :ref:`HScrollBar<class_HScrollBar>` **get_h_scrollbar** **(** **)**
- ----
- .. _class_ScrollContainer_method_get_v_scrollbar:
- - :ref:`VScrollBar<class_VScrollBar>` **get_v_scrollbar** **(** **)**
|