.. 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` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- A helper node for displaying scrollable elements (e.g. lists). Member Functions ---------------- +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_h_scroll` **(** **)** const | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_v_scroll` **(** **)** const | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_h_scroll_enabled` **(** **)** const | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_v_scroll_enabled` **(** **)** const | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_enable_h_scroll` **(** :ref:`bool` enable **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_enable_v_scroll` **(** :ref:`bool` enable **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_h_scroll` **(** :ref:`int` val **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_v_scroll` **(** :ref:`int` val **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`bool` **scroll_horizontal** - :ref:`bool` **scroll_vertical** Description ----------- A ScrollContainer node with a :ref:`Control` child and scrollbar child (HScrollbar, :ref:`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` 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` **get_h_scroll** **(** **)** const Return current horizontal scroll value. .. _class_ScrollContainer_get_v_scroll: - :ref:`int` **get_v_scroll** **(** **)** const Return current vertical scroll value. .. _class_ScrollContainer_is_h_scroll_enabled: - :ref:`bool` **is_h_scroll_enabled** **(** **)** const Return true if horizontal scroll is allowed. .. _class_ScrollContainer_is_v_scroll_enabled: - :ref:`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` enable **)** Set allows horizontal scroll. .. _class_ScrollContainer_set_enable_v_scroll: - void **set_enable_v_scroll** **(** :ref:`bool` enable **)** Set allows vertical scroll. .. _class_ScrollContainer_set_h_scroll: - void **set_h_scroll** **(** :ref:`int` val **)** Set horizontal scroll value. .. _class_ScrollContainer_set_v_scroll: - void **set_v_scroll** **(** :ref:`int` val **)** Set vertical scroll value.