mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
1819 lines
148 KiB
ReStructuredText
1819 lines
148 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_TreeItem:
|
||
|
||
TreeItem
|
||
========
|
||
|
||
**Успадковує:** :ref:`Object<class_Object>`
|
||
|
||
Внутрішній контроль за єдиним елементом всередині :ref:`Tree<class_Tree>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
Один елемент керування :ref:`Tree<class_Tree>`. Для створення ієрархії можна знайти інші **TreeItem**. Він також може містити текстові та кнопки. **TreeItem** не є :ref:`Node<class_Node>`, він внутрішній до :ref:`Tree<class_Tree>`.
|
||
|
||
Щоб створити **TreeItem**, скористайтеся :ref:`Tree.create_item()<class_Tree_method_create_item>` або :ref:`create_child()<class_TreeItem_method_create_child>`. Щоб видалити **TreeItem**, скористайтеся :ref:`об'єкта.free()<class_об'єкта_method_free>`.
|
||
|
||
\ **Note:** Значення ідентифікатора, що використовуються для кнопок 32-біт, на відміну від :ref:`int<class_int>`, який завжди 64-біт. ``-2147483648`` до ``2147483647``.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`collapsed<class_TreeItem_property_collapsed>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`custom_minimum_height<class_TreeItem_property_custom_minimum_height>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`disable_folding<class_TreeItem_property_disable_folding>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`visible<class_TreeItem_property_visible>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_button<class_TreeItem_method_add_button>`\ (\ column\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`, id\: :ref:`int<class_int>` = -1, disabled\: :ref:`bool<class_bool>` = false, tooltip_text\: :ref:`String<class_String>` = "", description\: :ref:`String<class_String>` = ""\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_child<class_TreeItem_method_add_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`call_recursive<class_TreeItem_method_call_recursive>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_buttons<class_TreeItem_method_clear_buttons>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_custom_bg_color<class_TreeItem_method_clear_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_custom_color<class_TreeItem_method_clear_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`create_child<class_TreeItem_method_create_child>`\ (\ index\: :ref:`int<class_int>` = -1\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`deselect<class_TreeItem_method_deselect>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`erase_button<class_TreeItem_method_erase_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`get_auto_translate_mode<class_TreeItem_method_get_auto_translate_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`get_autowrap_mode<class_TreeItem_method_get_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_button<class_TreeItem_method_get_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_by_id<class_TreeItem_method_get_button_by_id>`\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_button_color<class_TreeItem_method_get_button_color>`\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_count<class_TreeItem_method_get_button_count>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_id<class_TreeItem_method_get_button_id>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_button_tooltip_text<class_TreeItem_method_get_button_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` | :ref:`get_cell_mode<class_TreeItem_method_get_cell_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_child<class_TreeItem_method_get_child>`\ (\ index\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_child_count<class_TreeItem_method_get_child_count>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] | :ref:`get_children<class_TreeItem_method_get_children>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_custom_bg_color<class_TreeItem_method_get_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_custom_color<class_TreeItem_method_get_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Callable<class_Callable>` | :ref:`get_custom_draw_callback<class_TreeItem_method_get_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Font<class_Font>` | :ref:`get_custom_font<class_TreeItem_method_get_custom_font>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_custom_font_size<class_TreeItem_method_get_custom_font_size>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`get_custom_stylebox<class_TreeItem_method_get_custom_stylebox>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_description<class_TreeItem_method_get_description>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_expand_right<class_TreeItem_method_get_expand_right>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_first_child<class_TreeItem_method_get_first_child>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_TreeItem_method_get_icon>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_icon_max_width<class_TreeItem_method_get_icon_max_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_icon_modulate<class_TreeItem_method_get_icon_modulate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon_overlay<class_TreeItem_method_get_icon_overlay>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_icon_region<class_TreeItem_method_get_icon_region>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_index<class_TreeItem_method_get_index>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_language<class_TreeItem_method_get_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_metadata<class_TreeItem_method_get_metadata>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next<class_TreeItem_method_get_next>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_in_tree<class_TreeItem_method_get_next_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_visible<class_TreeItem_method_get_next_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_parent<class_TreeItem_method_get_parent>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev<class_TreeItem_method_get_prev>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_in_tree<class_TreeItem_method_get_prev_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_visible<class_TreeItem_method_get_prev_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_range<class_TreeItem_method_get_range>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_range_config<class_TreeItem_method_get_range_config>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`get_structured_text_bidi_override<class_TreeItem_method_get_structured_text_bidi_override>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>` | :ref:`get_structured_text_bidi_override_options<class_TreeItem_method_get_structured_text_bidi_override_options>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_suffix<class_TreeItem_method_get_suffix>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_text<class_TreeItem_method_get_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_text_alignment<class_TreeItem_method_get_text_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_text_direction<class_TreeItem_method_get_text_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`get_text_overrun_behavior<class_TreeItem_method_get_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_tooltip_text<class_TreeItem_method_get_tooltip_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Tree<class_Tree>` | :ref:`get_tree<class_TreeItem_method_get_tree>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_any_collapsed<class_TreeItem_method_is_any_collapsed>`\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_button_disabled<class_TreeItem_method_is_button_disabled>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_checked<class_TreeItem_method_is_checked>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_custom_set_as_button<class_TreeItem_method_is_custom_set_as_button>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_edit_multiline<class_TreeItem_method_is_edit_multiline>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_editable<class_TreeItem_method_is_editable>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_indeterminate<class_TreeItem_method_is_indeterminate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_selectable<class_TreeItem_method_is_selectable>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_selected<class_TreeItem_method_is_selected>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_TreeItem_method_is_visible_in_tree>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`move_after<class_TreeItem_method_move_after>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`move_before<class_TreeItem_method_move_before>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`propagate_check<class_TreeItem_method_propagate_check>`\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_child<class_TreeItem_method_remove_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`select<class_TreeItem_method_select>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_auto_translate_mode<class_TreeItem_method_set_auto_translate_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_autowrap_mode<class_TreeItem_method_set_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button<class_TreeItem_method_set_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_color<class_TreeItem_method_set_button_color>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_description<class_TreeItem_method_set_button_description>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_disabled<class_TreeItem_method_set_button_disabled>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_tooltip_text<class_TreeItem_method_set_button_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cell_mode<class_TreeItem_method_set_cell_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_checked<class_TreeItem_method_set_checked>`\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_collapsed_recursive<class_TreeItem_method_set_collapsed_recursive>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_bg_color<class_TreeItem_method_set_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`, just_outline\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_color<class_TreeItem_method_set_custom_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_draw<class_TreeItem_method_set_custom_draw>`\ (\ column\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, callback\: :ref:`StringName<class_StringName>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_font<class_TreeItem_method_set_custom_font>`\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_font_size<class_TreeItem_method_set_custom_font_size>`\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_stylebox<class_TreeItem_method_set_custom_stylebox>`\ (\ column\: :ref:`int<class_int>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_description<class_TreeItem_method_set_description>`\ (\ column\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_edit_multiline<class_TreeItem_method_set_edit_multiline>`\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_editable<class_TreeItem_method_set_editable>`\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_expand_right<class_TreeItem_method_set_expand_right>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon<class_TreeItem_method_set_icon>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_max_width<class_TreeItem_method_set_icon_max_width>`\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_modulate<class_TreeItem_method_set_icon_modulate>`\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_overlay<class_TreeItem_method_set_icon_overlay>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_region<class_TreeItem_method_set_icon_region>`\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_indeterminate<class_TreeItem_method_set_indeterminate>`\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_language<class_TreeItem_method_set_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_metadata<class_TreeItem_method_set_metadata>`\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_range<class_TreeItem_method_set_range>`\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_range_config<class_TreeItem_method_set_range_config>`\ (\ column\: :ref:`int<class_int>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`, expr\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_selectable<class_TreeItem_method_set_selectable>`\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_structured_text_bidi_override<class_TreeItem_method_set_structured_text_bidi_override>`\ (\ column\: :ref:`int<class_int>`, parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_structured_text_bidi_override_options<class_TreeItem_method_set_structured_text_bidi_override_options>`\ (\ column\: :ref:`int<class_int>`, args\: :ref:`Array<class_Array>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_suffix<class_TreeItem_method_set_suffix>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text<class_TreeItem_method_set_text>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text_alignment<class_TreeItem_method_set_text_alignment>`\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text_direction<class_TreeItem_method_set_text_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text_overrun_behavior<class_TreeItem_method_set_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`, overrun_behavior\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tooltip_text<class_TreeItem_method_set_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`uncollapse_tree<class_TreeItem_method_uncollapse_tree>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Переліки
|
||
----------------
|
||
|
||
.. _enum_TreeItem_TreeCellMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **TreeCellMode**: :ref:`🔗<enum_TreeItem_TreeCellMode>`
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_STRING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_STRING** = ``0``
|
||
|
||
У клітинці відображається мітка рядка, необов’язково з піктограмою. Коли текст доступний для редагування, його можна редагувати за допомогою :ref:`LineEdit<class_LineEdit>` або спливаючого вікна :ref:`TextEdit<class_TextEdit>`, якщо використовується :ref:`set_edit_multiline()<class_TreeItem_method_set_edit_multiline>`.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_CHECK:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CHECK** = ``1``
|
||
|
||
У комірці відображається прапорець, необов’язково з текстом і піктограмою. Прапорець можна натиснути, відпустити або встановити невизначений (через :ref:`set_indeterminate()<class_TreeItem_method_set_indeterminate>`). Не можна клацнути прапорцем, якщо клітинку не можна редагувати.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_RANGE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_RANGE** = ``2``
|
||
|
||
Клітка показує нумеричний діапазон. При редагуванні можна редагувати за допомогою слайдера діапазону. Використовуйте :ref:`set_range()<class_TreeItem_method_set_range>`, щоб встановити значення та :ref:`set_range_config()<class_TreeItem_method_set_range_config>` для налаштування діапазону.
|
||
|
||
Ця клітинка також може бути використана в текстовому режимі, коли ви призначаєте текст :ref:`set_text()<class_TreeItem_method_set_text>`. Окремі параметри з комою, наприклад ``"Option1,Option2,Option3"``.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_ICON:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_ICON** = ``3``
|
||
|
||
У клітинці відображається значок. Його не можна ні редагувати, ні відображати текст. Піктограма завжди знаходиться в центрі клітинки.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_CUSTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CUSTOM** = ``4``
|
||
|
||
Клітинка показує як натискається кнопка. Він буде відображати стрілку, схожу на :ref:`OptionButton<class_OptionButton>`, але не має можливості випадання (для цього можна використовувати :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`). Натискання кнопки видає сигнал :ref:`Tree.item_edited<class_Tree_signal_item_edited>`. Кнопка є плоскою за замовчуванням, ви можете використовувати :ref:`set_custom_as_button()<class_TreeItem_method_set_custom_as_button>` для відображення його з :ref:`StyleBox<class_StyleBox>`.
|
||
|
||
Цей режим також підтримує користувацький малюнок за допомогою :ref:`set_custom_draw_callback()<class_TreeItem_method_set_custom_draw_callback>`.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_TreeItem_property_collapsed:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **collapsed** :ref:`🔗<class_TreeItem_property_collapsed>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_collapsed**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_collapsed**\ (\ )
|
||
|
||
Якщо ``true``, деревоItem згортається.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_property_custom_minimum_height:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **custom_minimum_height** :ref:`🔗<class_TreeItem_property_custom_minimum_height>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_custom_minimum_height**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_custom_minimum_height**\ (\ )
|
||
|
||
На замовлення мінімальна висота.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_property_disable_folding:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **disable_folding** :ref:`🔗<class_TreeItem_property_disable_folding>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_disable_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_folding_disabled**\ (\ )
|
||
|
||
Якщо ``true``, складка вимкнена для цього TreeItem.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_property_visible:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **visible** :ref:`🔗<class_TreeItem_property_visible>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_visible**\ (\ )
|
||
|
||
Якщо ``true``, то **TreeItem** видно (за замовчуванням).
|
||
|
||
Зауважте, що якщо **TreeItem** не буде видно, жоден з його дітей буде видно.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_TreeItem_method_add_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_button**\ (\ column\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`, id\: :ref:`int<class_int>` = -1, disabled\: :ref:`bool<class_bool>` = false, tooltip_text\: :ref:`String<class_String>` = "", description\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_TreeItem_method_add_button>`
|
||
|
||
Додає кнопку з :ref:`Texture2D<class_Texture2D>` ``button`` в кінець комірки у стовпці ``column``. ``id`` використовується для ідентифікації кнопки у відповідному сигналі :ref:`Tree.button_clicked<class_Tree_signal_button_clicked>` і може відрізнятися від індексу кнопки. Якщо не вказано, використовується наступний доступний індекс, який можна отримати, викликавши метод :ref:`get_button_count()<class_TreeItem_method_get_button_count>` безпосередньо перед цим методом. За потреби, кнопка може мати значення ``disabled`` та значення ``tooltip_text``. ``description`` використовується як опис кнопки для допоміжних програм.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_add_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_add_child>`
|
||
|
||
Додає раніше не приналежний до батьківського елемента **TreeItem** як прямого дочірнього елемента цього елемента. Елемент ``child`` не повинен бути частиною жодного елемента :ref:`Tree<class_Tree>` або бути батьківським для будь-якого елемента **TreeItem**. Див. також :ref:`remove_child()<class_TreeItem_method_remove_child>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_call_recursive:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **call_recursive**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_TreeItem_method_call_recursive>`
|
||
|
||
Рекурсивно викликає метод ``method`` для фактичного TreeItem та його дочірніх об'єктів. Передайте параметри у вигляді списку, розділеного комами.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_clear_buttons:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_buttons**\ (\ ) :ref:`🔗<class_TreeItem_method_clear_buttons>`
|
||
|
||
Видаляє всі кнопки з усіх стовпців цього елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_clear_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_clear_custom_bg_color>`
|
||
|
||
Стійкість фонового кольору для заданого стовпця до за замовчуванням.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_clear_custom_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_clear_custom_color>`
|
||
|
||
Смоктати колір для заданого стовпчика за замовчуванням.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_create_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **create_child**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TreeItem_method_create_child>`
|
||
|
||
Створює елемент і додає її дитині.
|
||
|
||
Новий пункт буде вставлятися як позицію ``index`` (ціна за замовчуванням ``-1`` означає останню позицію), або це буде остання дитина, якщо ``index`` вище, ніж дитина.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_deselect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **deselect**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_deselect>`
|
||
|
||
Видаляє задану стовпчик.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_erase_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **erase_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_erase_button>`
|
||
|
||
Видалити кнопку в індексі ``button_index`` в стовпчику ``стовпчик``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_auto_translate_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_auto_translate_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_auto_translate_mode>`
|
||
|
||
Повертає режим автоматичного перекладу стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_autowrap_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_autowrap_mode>`
|
||
|
||
Повертаємо режим автоматичного відновлення тексту в даній ``column``. За замовчуванням це :ref:`TextServer. AUTOWRAP_OFF<class_TextServer_constant_ AUTOWRAP_OFF>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button>`
|
||
|
||
Повертаємо :ref:`Texture2D<class_Texture2D>` кнопки в індексі ``button_index`` в стовпчику ``стовпчик``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_by_id:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_by_id**\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_by_id>`
|
||
|
||
Повертає індекс кнопки, якщо у стовпці ``column_param`` є кнопка з ідентифікатором ``param_id``, інакше повертає -1.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_button_color**\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_color>`
|
||
|
||
Повертає колір кнопки з ідентифікатором ``id`` в стовпчику ``column``. Якщо зазначена кнопка не існує, повертає :ref:`Color.BLACK<class_Color_constant_BLACK>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_count**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_count>`
|
||
|
||
Повертає кількість кнопок у стовпчику ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_id:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_id**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_id>`
|
||
|
||
Повертає ідентифікатор за кнопкою в індексі ``button_index`` в стовпчику ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_button_tooltip_text**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_tooltip_text>`
|
||
|
||
Повертаємо інструмент для кнопки в index ``button_index`` в стовпчику ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_cell_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **get_cell_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_cell_mode>`
|
||
|
||
Повертає режим комірки стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_child**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_get_child>`
|
||
|
||
Повертає дочірній елемент за його ``index`` (див. :ref:`get_child_count()<class_TreeItem_method_get_child_count>`). Цей метод часто використовується для ітерації всіх дочірніх елементів елемента.
|
||
|
||
Від'ємні індекси отримують доступ до дочірніх елементів, починаючи з останнього.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_child_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_child_count**\ (\ ) :ref:`🔗<class_TreeItem_method_get_child_count>`
|
||
|
||
Повертає кількість вкладених елементів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_children:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] **get_children**\ (\ ) :ref:`🔗<class_TreeItem_method_get_children>`
|
||
|
||
Повертає масив посилань на дітей пункту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_bg_color>`
|
||
|
||
Повертає користувацький фоновий колір стовпчика ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_color>`
|
||
|
||
Повертає нестандартний колір стовпчика ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_draw_callback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Callable<class_Callable>` **get_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_draw_callback>`
|
||
|
||
Повертає користувацький зворотний дзвінок стовпчика ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Font<class_Font>` **get_custom_font**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_font>`
|
||
|
||
Повертає користувацький шрифт, який використовується для малювання тексту в стовпчику ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_font_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_custom_font_size**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_font_size>`
|
||
|
||
Повертає користувацький розмір шрифту, який використовується для відображення тексту в стовпчику ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_stylebox:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **get_custom_stylebox**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_stylebox>`
|
||
|
||
Returns the given column's custom :ref:`StyleBox<class_StyleBox>` used to draw the background.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_description:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_description**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_description>`
|
||
|
||
Повертає опис заданого стовпця для допоміжних програм.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_expand_right:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_expand_right**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_expand_right>`
|
||
|
||
``true`` if ``expand_right`` встановлюється.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_first_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_first_child**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_first_child>`
|
||
|
||
Повертаємо першу дитину TreeItem.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon>`
|
||
|
||
Повернення даної іконки стовпчика :ref:`Texture2D<class_Texture2D>`. Помилка, якщо не встановлено іконку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_max_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_icon_max_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_max_width>`
|
||
|
||
Повертаємо максимальну допустиму ширину ікони в наведеному ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_modulate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_icon_modulate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_modulate>`
|
||
|
||
Повертає :ref:`Color<class_Color>`, що модулює піктограму стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_overlay:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_icon_overlay**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_overlay>`
|
||
|
||
Повертає накладення значка заданого стовпця :ref:`Texture2D<class_Texture2D>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_region:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_icon_region**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_region>`
|
||
|
||
Повернення іконки :ref:`Texture2D<class_Texture2D>` область як :ref:`Rect2<class_Rect2>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_index**\ (\ ) :ref:`🔗<class_TreeItem_method_get_index>`
|
||
|
||
Повернення замовлення вузла в дерево. Наприклад, якщо називається на першому пункті дитини, позиція ``0``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_language>`
|
||
|
||
Повертає код мови тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_metadata**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_metadata>`
|
||
|
||
Повертає значення метаданих, яка була встановлена для даного стовпця, використовуючи :ref:`set_metadata()<class_TreeItem_method_set_metadata>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_next:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_next>`
|
||
|
||
Повертає наступний однорідний TreeItem у дереві або об’єкт ``null``, якщо його немає.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_next_in_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_next_in_tree>`
|
||
|
||
Повертаємо наступний TreeItem в дереві (у контексті першого пошуку глибини) або об'єкта ``null``, якщо немає.
|
||
|
||
Якщо ввімкнено параметр ``wrap``, метод буде обгорнути до першого елемента в дереві, коли називається останній елемент, інакше він повертає ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_next_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_next_visible>`
|
||
|
||
Повертаємо наступний видимий TreeItem в дереві (у контексті першого пошуку глибини) або об'єкта ``null``, якщо немає.
|
||
|
||
Якщо ввімкнено параметр ``wrap``, метод буде обгорнути до першого видимого елемента в дереві, коли називається на останньому видимому елементі, інакше він повертає ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_parent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_parent**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_parent>`
|
||
|
||
Повертає батьківський TreeItem або об’єкт ``null``, якщо його немає.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_prev:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_prev**\ (\ ) :ref:`🔗<class_TreeItem_method_get_prev>`
|
||
|
||
Повертає попередній брат TreeItem у дереві або об’єкт ``null``, якщо його немає.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_prev_in_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_prev_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_prev_in_tree>`
|
||
|
||
Повертає попередній TreeItem в дереві (у контексті першого пошуку глибини) або об'єкта ``null``, якщо немає.
|
||
|
||
Якщо ввімкнено параметр ``wrap``, метод буде обгорнути до останнього елемента в дереві, коли називається на першому видимому елементі, інакше він повертає ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_prev_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_prev_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_prev_visible>`
|
||
|
||
Повертаємо попередню видиму муфту TreeItem в дереві (у контексті глибинного пошуку) або об'єкта ``нулл``, якщо немає.
|
||
|
||
Якщо ввімкнено параметр ``wrap``, метод буде обгорнути до останнього видимого елемента в дереві, коли називається на першому видимому елементі, інакше він повертає ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_range**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_range>`
|
||
|
||
Повертає значення стовпчика :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_range_config:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **get_range_config**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_get_range_config>`
|
||
|
||
Повертає словник, що містить параметри діапазону для даної колонки. Ключі "мін", "макс", "степ", "експерт".
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_structured_text_bidi_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_structured_text_bidi_override>`
|
||
|
||
Повертає набір алгоритму BiDi для цієї комірки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_structured_text_bidi_override_options:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_structured_text_bidi_override_options>`
|
||
|
||
Повертаємо додаткові опції BiDi для цієї комірки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_suffix:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_suffix**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_suffix>`
|
||
|
||
Отримує суфіксний рядок, що відображається після значення стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text>`
|
||
|
||
Повернення тексту заданого стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text_alignment:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_text_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_alignment>`
|
||
|
||
Повертає текст з вирівнюванням заданого стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_direction>`
|
||
|
||
Повертає напрямок написання тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text_overrun_behavior:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_overrun_behavior>`
|
||
|
||
Повертає поведінку відсікання, коли текст перевищує обмежувальний прямокутник елемента у заданому стовпці ``column``. За замовчуванням це :ref:`TextServer.OVERRUN_TRIM_ELLIPSIS<class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_tooltip_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_tooltip_text>`
|
||
|
||
Повертає наведений текст стовпчика.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Tree<class_Tree>` **get_tree**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_tree>`
|
||
|
||
Повернутися до :ref:`Tree<class_Tree>`, який володіє цим TreeItem.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_any_collapsed:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_any_collapsed**\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_is_any_collapsed>`
|
||
|
||
Повертаємо ``true``, якщо це **TreeItem**, або будь-який з його нащадків, згортається.
|
||
|
||
\ ``true`` він ігнорує невидимі **TreeItem**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_button_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_button_disabled**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_button_disabled>`
|
||
|
||
Повертає ``true``, якщо кнопка в індексі ``button_index`` для наданої ``column`` вимкнена.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_checked:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_checked**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_checked>`
|
||
|
||
Повертаємо ``true``, якщо надана ``пам'яна колона`` перевіряється.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_custom_set_as_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_custom_set_as_button**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_custom_set_as_button>`
|
||
|
||
Повертає ``true``, якщо клітинку було перетворено на кнопку за допомогою :ref:`set_custom_as_button()<class_TreeItem_method_set_custom_as_button>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_edit_multiline:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_edit_multiline**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_edit_multiline>`
|
||
|
||
Повертає ``true``, якщо надана ``column`` є багатоканальним редагуванням.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_editable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_editable**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_is_editable>`
|
||
|
||
Повертає ``true``, якщо надана ``column`` редагується.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_indeterminate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_indeterminate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_indeterminate>`
|
||
|
||
Повертаємо ``true``, якщо надана ``column`` є невід'ємною.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_selectable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_selectable**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_selectable>`
|
||
|
||
Повертаємо ``true``, якщо надана ``column`` вибирається.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_selected**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_is_selected>`
|
||
|
||
Повертає ``true``, якщо вибраний ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_visible_in_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_visible_in_tree**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_is_visible_in_tree>`
|
||
|
||
``true``, якщо ``true`` і всі його предки також видно.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_move_after:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **move_after**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_move_after>`
|
||
|
||
Переміщення цього TreeItem прямо після вказаного ``item``.
|
||
|
||
\ **Примітка:** Не можна переходити до кореня або перемістити корінь.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_move_before:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **move_before**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_move_before>`
|
||
|
||
Переміщення цього TreeItem прямо перед цим ``item``.
|
||
|
||
\ **Примітка:** Не можна переходити до кореня або перемістити корінь.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_propagate_check:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **propagate_check**\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TreeItem_method_propagate_check>`
|
||
|
||
Пропагує цей пункт перевірив статус дітям та батькам надану ``column``. Можна обробити елементи, що впливають на цей метод, за допомогою підключення до :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>`. Для того, щоб елементи, які постраждали будуть оброблятися, слід: предмет, що викликає цей метод, діти цього предмета, і, нарешті, батьки цього предмета. ``false``, потім :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>` не буде вдаватися.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_remove_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_remove_child>`
|
||
|
||
Видаляє заданий дочірній елемент **TreeItem** та всі його дочірні елементи з :ref:`Tree<class_Tree>`. Зверніть увагу, що це не звільняє елемент з пам'яті, тому його можна використовувати повторно пізніше (див. :ref:`add_child()<class_TreeItem_method_add_child>`). Щоб повністю видалити **TreeItem**, використовуйте :ref:`Object.free()<class_Object_method_free>`.
|
||
|
||
\ **Примітка:** Якщо ви хочете перемістити дочірній елемент з одного :ref:`Tree<class_Tree>` до іншого, то замість видалення та додавання його вручну ви можете використовувати :ref:`move_before()<class_TreeItem_method_move_before>` або :ref:`move_after()<class_TreeItem_method_move_after>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_select:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **select**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_select>`
|
||
|
||
Вибирає задану ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_auto_translate_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_auto_translate_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) :ref:`🔗<class_TreeItem_method_set_auto_translate_mode>`
|
||
|
||
Встановлює режим автоматичного перекладу даного стовпця на ``mode``.
|
||
|
||
Усі стовпці за замовчуванням використовують :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>`, який використовує той самий режим автоматичного перекладу, що й саме :ref:`Tree<class_Tree>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_autowrap_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_autowrap_mode**\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) :ref:`🔗<class_TreeItem_method_set_autowrap_mode>`
|
||
|
||
Встановлює режим автозберігання в даній ``column``. Якщо встановити щось інше, ніж :ref:`TextServer. AUTOWRAP_OFF<class_TextServer_constant_ AUTOWRAP_OFF>`, текст загортається всередині прямокутника комірки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_button>`
|
||
|
||
Встановлює задану кнопку стовпчика :ref:`Texture2D<class_Texture2D>` в індексі ``button_index`` до ``button``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_color**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_button_color>`
|
||
|
||
Встановлює колір кнопки заданого стовпця за індексом ``button_index`` до ``color``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_description:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_description**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_button_description>`
|
||
|
||
Встановлює опис кнопки заданого стовпця за індексом ``button_index`` для допоміжних програм.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_disabled**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_button_disabled>`
|
||
|
||
Якщо ``true``, вимкнено кнопку в індексі ``button_index`` в даній ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_tooltip_text**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_button_tooltip_text>`
|
||
|
||
Встановлює текстовий інструмент для кнопки в індексі ``button_index`` в даній ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_cell_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cell_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) :ref:`🔗<class_TreeItem_method_set_cell_mode>`
|
||
|
||
Встановлює режим комірки заданого стовпця на ``mode``. Це визначає, як комірка відображається та редагується.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_checked:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_checked**\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_checked>`
|
||
|
||
Якщо ``checked`` має значення ``true``, то заданий ``column`` перевіряється. Очищає невизначений статус стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_collapsed_recursive:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_collapsed_recursive**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_collapsed_recursive>`
|
||
|
||
Збірники або незбираючі це **TreeItem** і всі нащадки цього пункту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_as_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_as_button**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_as_button>`
|
||
|
||
Зробіть комірку з :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>`, як кнопка не завантажити з :ref:`StyleBox<class_StyleBox>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_bg_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`, just_outline\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_set_custom_bg_color>`
|
||
|
||
Sets the given column's custom background color and whether to just use it as an outline.
|
||
|
||
\ **Note:** If a custom :ref:`StyleBox<class_StyleBox>` is set, the background color will be drawn behind it.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_color>`
|
||
|
||
Налаштовує замовний колір даної колонки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_draw:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_draw**\ (\ column\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, callback\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_draw>`
|
||
|
||
**Застаріло:** Use :ref:`set_custom_draw_callback()<class_TreeItem_method_set_custom_draw_callback>` instead.
|
||
|
||
Налаштовує замовний зворотний дзвінок даної колонки на метод ``callback``.
|
||
|
||
Метод названий ``callback`` повинен прийняти два аргументи: **TreeItem**, який намальовується і його позиція і розмір як :ref:`Rect2<class_Rect2>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_draw_callback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_draw_callback>`
|
||
|
||
Налаштовує замовний зворотний дзвінок даної колонки. Використовуйте порожній :ref:`Callable<class_Callable>` (``Callable()``) для очищення користувацького зворотного виклику. У клітинку можна скористатися цією функцією.
|
||
|
||
\ ``callback`` повинен прийняти два аргументи: **TreeItem**, який намальовується і його позиція і розмір як :ref:`Rect2<class_Rect2>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_font**\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_font>`
|
||
|
||
Налаштовує користувальницький шрифт, який використовується для малювання тексту в даній ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_font_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_font_size**\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_font_size>`
|
||
|
||
Налаштовує користувальницький розмір шрифту, який використовується для відображення тексту в даній ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_stylebox:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_stylebox**\ (\ column\: :ref:`int<class_int>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_stylebox>`
|
||
|
||
Sets the given column's custom :ref:`StyleBox<class_StyleBox>` used to draw the background.
|
||
|
||
\ **Note:** If a custom background color is set, the :ref:`StyleBox<class_StyleBox>` will be drawn in front of it.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_description:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_description**\ (\ column\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_description>`
|
||
|
||
Встановлює опис заданого стовпця для допоміжних програм.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_edit_multiline:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_edit_multiline**\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_edit_multiline>`
|
||
|
||
Якщо ``multiline`` є ``true``, надана ``стовпчик`` є багатоканальним редагуванням.
|
||
|
||
\ **Примітка:** Ця опція тільки впливає на тип управління (:ref:`LineEdit<class_LineEdit>` або :ref:`TextEdit<class_TextEdit>`), який з'являється при редагування стовпця. Ви можете встановити багатолінійні значення з :ref:`set_text()<class_TreeItem_method_set_text>` навіть якщо стовпчик не багатоканальний редагований.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_editable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_editable**\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_editable>`
|
||
|
||
Якщо ``ввімкнено`` є ``true``, надана ``column`` редагується.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_expand_right:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_expand_right**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_expand_right>`
|
||
|
||
Якщо ``enable`` ``true``, надана ``column`` розширюється праворуч.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_icon>`
|
||
|
||
Встановлює піктограму :ref:`Texture2D<class_Texture2D>` заданої клітинки. Якщо клітинка знаходиться в режимі :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>`, піктограма відображається в центрі клітинки. В іншому випадку піктограма відображається перед текстом клітинки. :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` не відображає значок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_max_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_max_width**\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_max_width>`
|
||
|
||
Налаштовує максимальну допустиму ширину ікони в наведеному ``column``. Цей ліміт наноситься зверху за замовчуванням, розмір іконки і зверху :ref:`Tree.icon_max_width<class_Tree_theme_constant_icon_max_width>`. Висота регульована відповідно до співвідношення ікони.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_modulate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_modulate**\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_modulate>`
|
||
|
||
Модулює задану іконку стовпчика з ``modulate``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_overlay:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_overlay**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_overlay>`
|
||
|
||
Встановлює накладання піктограм даної комірки :ref:`Texture2D<class_Texture2D>`. Комірка має бути в режимі :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>`, а значок має бути встановлено. Оверлей малюється поверх значка, у нижньому лівому куті.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_region:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_region**\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_region>`
|
||
|
||
Встановлює фактурну область даної колони.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_indeterminate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_indeterminate**\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_indeterminate>`
|
||
|
||
Якщо ``indetermination`` є ``true``, надана ``column`` позначена неглибока.
|
||
|
||
\ **Note:** Якщо встановити ``true`` з ``false``, то стовпчик очищається від перевіреного стану.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_language>`
|
||
|
||
Sets the language code of the given ``column``'s text to ``language``. This is used for line-breaking and text shaping algorithms. If ``language`` is empty, the current locale is used.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_metadata**\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TreeItem_method_set_metadata>`
|
||
|
||
Встановлює значення метаданих для даного стовпця, який можна отримати пізніше за допомогою :ref:`get_metadata()<class_TreeItem_method_get_metadata>`. Це можна використовувати, наприклад, зберігати посилання на оригінальні дані.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_range**\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TreeItem_method_set_range>`
|
||
|
||
Встановлює значення стовпчика :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_range_config:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_range_config**\ (\ column\: :ref:`int<class_int>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`, expr\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_set_range_config>`
|
||
|
||
Встановлює діапазон прийнятих значень для стовпця. Колонка повинна бути в режимі :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`.
|
||
|
||
Якщо ``expr`` є ``true``, змінний режим слайдера буде використовуватися в режимі реального масштабу, як з :ref:`Range.exp_edit<class_Range_property_exp_edit>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_selectable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_selectable**\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_selectable>`
|
||
|
||
Якщо ``selectable`` є ``true``, надана ``column`` вибирається.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_structured_text_bidi_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_structured_text_bidi_override**\ (\ column\: :ref:`int<class_int>`, parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) :ref:`🔗<class_TreeItem_method_set_structured_text_bidi_override>`
|
||
|
||
Настроювання алгоритму BiDi для структурованого тексту. Має ефект для клітин, які відображають текст.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_structured_text_bidi_override_options:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_structured_text_bidi_override_options**\ (\ column\: :ref:`int<class_int>`, args\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TreeItem_method_set_structured_text_bidi_override_options>`
|
||
|
||
Налаштуйте додаткові параметри для перенади BiDi. Має ефект для клітин, які відображають текст.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_suffix:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_suffix**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_suffix>`
|
||
|
||
Встановлює рядок для відображення після значення стовпця (наприклад, абревіатура).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_text>`
|
||
|
||
Встановлює задану значення стовпця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text_alignment:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text_alignment**\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`🔗<class_TreeItem_method_set_text_alignment>`
|
||
|
||
Встановлює вирівнювання тексту заданого стовпця на ``text_alignment``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_TreeItem_method_set_text_direction>`
|
||
|
||
Встановлює напрямок написання тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text_overrun_behavior:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`, overrun_behavior\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) :ref:`🔗<class_TreeItem_method_set_text_overrun_behavior>`
|
||
|
||
Встановлює поведінку кліпінгу, коли текст перевищить прямокутник елемента в даній ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tooltip_text**\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_tooltip_text>`
|
||
|
||
Встановлює заданий текст стовпчика.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_uncollapse_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **uncollapse_tree**\ (\ ) :ref:`🔗<class_TreeItem_method_uncollapse_tree>`
|
||
|
||
Uncollapses all **TreeItem**, необхідно для виявлення цього **TreeItem**, тобто всіх предків **TreeItem**\ s.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|