class_scrollcontainer.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. **Inherited By:** :ref:`EditorInspector<class_EditorInspector>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. A helper node for displaying scrollable elements (e.g. lists).
  13. Properties
  14. ----------
  15. +-------------------------+--------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`scroll_deadzone<class_ScrollContainer_property_scroll_deadzone>` |
  17. +-------------------------+--------------------------------------------------------------------------------------------+
  18. | :ref:`int<class_int>` | :ref:`scroll_horizontal<class_ScrollContainer_property_scroll_horizontal>` |
  19. +-------------------------+--------------------------------------------------------------------------------------------+
  20. | :ref:`bool<class_bool>` | :ref:`scroll_horizontal_enabled<class_ScrollContainer_property_scroll_horizontal_enabled>` |
  21. +-------------------------+--------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`scroll_vertical<class_ScrollContainer_property_scroll_vertical>` |
  23. +-------------------------+--------------------------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`scroll_vertical_enabled<class_ScrollContainer_property_scroll_vertical_enabled>` |
  25. +-------------------------+--------------------------------------------------------------------------------------------+
  26. Methods
  27. -------
  28. +-------------------------------------+----------------------------------------------------------------------------------+
  29. | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scrollbar<class_ScrollContainer_method_get_h_scrollbar>` **(** **)** |
  30. +-------------------------------------+----------------------------------------------------------------------------------+
  31. | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scrollbar<class_ScrollContainer_method_get_v_scrollbar>` **(** **)** |
  32. +-------------------------------------+----------------------------------------------------------------------------------+
  33. Theme Properties
  34. ----------------
  35. +---------------------------------+----+
  36. | :ref:`StyleBox<class_StyleBox>` | bg |
  37. +---------------------------------+----+
  38. Signals
  39. -------
  40. .. _class_ScrollContainer_signal_scroll_ended:
  41. - **scroll_ended** **(** **)**
  42. Emitted whenever scrolling stops.
  43. .. _class_ScrollContainer_signal_scroll_started:
  44. - **scroll_started** **(** **)**
  45. Emitted whenever scrolling is started.
  46. Description
  47. -----------
  48. A ScrollContainer node with a :ref:`Control<class_Control>` child and scrollbar child (:ref:`HScrollBar<class_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).
  49. Property Descriptions
  50. ---------------------
  51. .. _class_ScrollContainer_property_scroll_deadzone:
  52. - :ref:`int<class_int>` **scroll_deadzone**
  53. +----------+---------------------+
  54. | *Setter* | set_deadzone(value) |
  55. +----------+---------------------+
  56. | *Getter* | get_deadzone() |
  57. +----------+---------------------+
  58. .. _class_ScrollContainer_property_scroll_horizontal:
  59. - :ref:`int<class_int>` **scroll_horizontal**
  60. +----------+---------------------+
  61. | *Setter* | set_h_scroll(value) |
  62. +----------+---------------------+
  63. | *Getter* | get_h_scroll() |
  64. +----------+---------------------+
  65. The current horizontal scroll value.
  66. .. _class_ScrollContainer_property_scroll_horizontal_enabled:
  67. - :ref:`bool<class_bool>` **scroll_horizontal_enabled**
  68. +----------+----------------------------+
  69. | *Setter* | set_enable_h_scroll(value) |
  70. +----------+----------------------------+
  71. | *Getter* | is_h_scroll_enabled() |
  72. +----------+----------------------------+
  73. If ``true``, enables horizontal scrolling.
  74. .. _class_ScrollContainer_property_scroll_vertical:
  75. - :ref:`int<class_int>` **scroll_vertical**
  76. +----------+---------------------+
  77. | *Setter* | set_v_scroll(value) |
  78. +----------+---------------------+
  79. | *Getter* | get_v_scroll() |
  80. +----------+---------------------+
  81. The current vertical scroll value.
  82. .. _class_ScrollContainer_property_scroll_vertical_enabled:
  83. - :ref:`bool<class_bool>` **scroll_vertical_enabled**
  84. +----------+----------------------------+
  85. | *Setter* | set_enable_v_scroll(value) |
  86. +----------+----------------------------+
  87. | *Getter* | is_v_scroll_enabled() |
  88. +----------+----------------------------+
  89. If ``true``, enables vertical scrolling.
  90. Method Descriptions
  91. -------------------
  92. .. _class_ScrollContainer_method_get_h_scrollbar:
  93. - :ref:`HScrollBar<class_HScrollBar>` **get_h_scrollbar** **(** **)**
  94. .. _class_ScrollContainer_method_get_v_scrollbar:
  95. - :ref:`VScrollBar<class_VScrollBar>` **get_v_scrollbar** **(** **)**