class_scrollcontainer.rst 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ScrollContainer.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ScrollContainer:
  5. ScrollContainer
  6. ===============
  7. **Inherits:** :ref:`Container<class_container>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A helper node for displaying scrollable elements (e.g. lists).
  12. Signals
  13. -------
  14. .. _class_ScrollContainer_scroll_ended:
  15. - **scroll_ended** **(** **)**
  16. Emitted whenever scrolling stops.
  17. .. _class_ScrollContainer_scroll_started:
  18. - **scroll_started** **(** **)**
  19. Emitted whenever scrolling is started.
  20. Member Variables
  21. ----------------
  22. .. _class_ScrollContainer_scroll_horizontal:
  23. - :ref:`int<class_int>` **scroll_horizontal** - The current horizontal scroll value.
  24. .. _class_ScrollContainer_scroll_horizontal_enabled:
  25. - :ref:`bool<class_bool>` **scroll_horizontal_enabled** - If ``true``, enables horizontal scrolling.
  26. .. _class_ScrollContainer_scroll_vertical:
  27. - :ref:`int<class_int>` **scroll_vertical** - The current horizontal scroll value.
  28. .. _class_ScrollContainer_scroll_vertical_enabled:
  29. - :ref:`bool<class_bool>` **scroll_vertical_enabled** - If ``true``, enables vertical scrolling.
  30. Description
  31. -----------
  32. 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).