.. 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//doc_classes. .. _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 | +------------------------+-----------------------------------------------------------------------------------------------+ | void | :ref:`set_h_scroll` **(** :ref:`int` val **)** | +------------------------+-----------------------------------------------------------------------------------------------+ | void | :ref:`set_v_scroll` **(** :ref:`int` val **)** | +------------------------+-----------------------------------------------------------------------------------------------+ Member Variables ---------------- .. _class_ScrollContainer_scroll_horizontal: - :ref:`bool` **scroll_horizontal** .. _class_ScrollContainer_scroll_vertical: - :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_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.