class_scrollcontainer.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. Member Functions
  13. ----------------
  14. +------------------------+-----------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_h_scroll<class_ScrollContainer_get_h_scroll>` **(** **)** const |
  16. +------------------------+-----------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_v_scroll<class_ScrollContainer_get_v_scroll>` **(** **)** const |
  18. +------------------------+-----------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_h_scroll<class_ScrollContainer_set_h_scroll>` **(** :ref:`int<class_int>` val **)** |
  20. +------------------------+-----------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_v_scroll<class_ScrollContainer_set_v_scroll>` **(** :ref:`int<class_int>` val **)** |
  22. +------------------------+-----------------------------------------------------------------------------------------------+
  23. Member Variables
  24. ----------------
  25. .. _class_ScrollContainer_scroll_horizontal:
  26. - :ref:`bool<class_bool>` **scroll_horizontal**
  27. .. _class_ScrollContainer_scroll_vertical:
  28. - :ref:`bool<class_bool>` **scroll_vertical**
  29. Description
  30. -----------
  31. 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).
  32. Member Function Description
  33. ---------------------------
  34. .. _class_ScrollContainer_get_h_scroll:
  35. - :ref:`int<class_int>` **get_h_scroll** **(** **)** const
  36. Return current horizontal scroll value.
  37. .. _class_ScrollContainer_get_v_scroll:
  38. - :ref:`int<class_int>` **get_v_scroll** **(** **)** const
  39. Return current vertical scroll value.
  40. .. _class_ScrollContainer_set_h_scroll:
  41. - void **set_h_scroll** **(** :ref:`int<class_int>` val **)**
  42. Set horizontal scroll value.
  43. .. _class_ScrollContainer_set_v_scroll:
  44. - void **set_v_scroll** **(** :ref:`int<class_int>` val **)**
  45. Set vertical scroll value.