123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
- .. _class_ScrollContainer:
- ScrollContainer
- ===============
- **Inherits:** :ref:`Container<class_container>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- A helper node for displaying scrollable elements (e.g. lists).
- Member Functions
- ----------------
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_h_scroll<class_ScrollContainer_get_h_scroll>` **(** **)** const |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_v_scroll<class_ScrollContainer_get_v_scroll>` **(** **)** const |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_h_scroll_enabled<class_ScrollContainer_is_h_scroll_enabled>` **(** **)** const |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_v_scroll_enabled<class_ScrollContainer_is_v_scroll_enabled>` **(** **)** const |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_enable_h_scroll<class_ScrollContainer_set_enable_h_scroll>` **(** :ref:`bool<class_bool>` enable **)** |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_enable_v_scroll<class_ScrollContainer_set_enable_v_scroll>` **(** :ref:`bool<class_bool>` enable **)** |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_h_scroll<class_ScrollContainer_set_h_scroll>` **(** :ref:`int<class_int>` val **)** |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_v_scroll<class_ScrollContainer_set_v_scroll>` **(** :ref:`int<class_int>` val **)** |
- +--------------------------+--------------------------------------------------------------------------------------------------------------------+
- Description
- -----------
- A ScrollContainer node with a :ref:`Control<class_control>` child and scrollbar child (HScrollbar, :ref:`VScrollBar<class_vscrollbar>`, or both) 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).
- Member Function Description
- ---------------------------
- .. _class_ScrollContainer_get_h_scroll:
- - :ref:`int<class_int>` **get_h_scroll** **(** **)** const
- Return current horizontal scroll value.
- .. _class_ScrollContainer_get_v_scroll:
- - :ref:`int<class_int>` **get_v_scroll** **(** **)** const
- Return current vertical scroll value.
- .. _class_ScrollContainer_is_h_scroll_enabled:
- - :ref:`bool<class_bool>` **is_h_scroll_enabled** **(** **)** const
- Return true if horizontal scroll is allowed.
- .. _class_ScrollContainer_is_v_scroll_enabled:
- - :ref:`bool<class_bool>` **is_v_scroll_enabled** **(** **)** const
- Return true if vertical scroll is allowed.
- .. _class_ScrollContainer_set_enable_h_scroll:
- - void **set_enable_h_scroll** **(** :ref:`bool<class_bool>` enable **)**
- Set allows horizontal scroll.
- .. _class_ScrollContainer_set_enable_v_scroll:
- - void **set_enable_v_scroll** **(** :ref:`bool<class_bool>` enable **)**
- Set allows vertical scroll.
- .. _class_ScrollContainer_set_h_scroll:
- - void **set_h_scroll** **(** :ref:`int<class_int>` val **)**
- Set horizontal scroll value.
- .. _class_ScrollContainer_set_v_scroll:
- - void **set_v_scroll** **(** :ref:`int<class_int>` val **)**
- Set vertical scroll value.
|