class_treeitem.rst 135 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TreeItem.xml.
  6. .. _class_TreeItem:
  7. TreeItem
  8. ========
  9. **Inherits:** :ref:`Object<class_Object>`
  10. An internal control for a single item inside :ref:`Tree<class_Tree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A single item of a :ref:`Tree<class_Tree>` control. It can contain other **TreeItem**\ s as children, which allows it to create a hierarchy. It can also contain text and buttons. **TreeItem** is not a :ref:`Node<class_Node>`, it is internal to the :ref:`Tree<class_Tree>`.
  15. To create a **TreeItem**, use :ref:`Tree.create_item()<class_Tree_method_create_item>` or :ref:`create_child()<class_TreeItem_method_create_child>`. To remove a **TreeItem**, use :ref:`Object.free()<class_Object_method_free>`.
  16. \ **Note:** The ID values used for buttons are 32-bit, unlike :ref:`int<class_int>` which is always 64-bit. They go from ``-2147483648`` to ``2147483647``.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +-------------------------+-----------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`collapsed<class_TreeItem_property_collapsed>` |
  24. +-------------------------+-----------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`custom_minimum_height<class_TreeItem_property_custom_minimum_height>` |
  26. +-------------------------+-----------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`disable_folding<class_TreeItem_property_disable_folding>` |
  28. +-------------------------+-----------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`visible<class_TreeItem_property_visible>` |
  30. +-------------------------+-----------------------------------------------------------------------------+
  31. .. rst-class:: classref-reftable-group
  32. Methods
  33. -------
  34. .. table::
  35. :widths: auto
  36. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | |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>` = ""\ ) |
  38. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | |void| | :ref:`add_child<class_TreeItem_method_add_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) |
  40. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | |void| | :ref:`call_recursive<class_TreeItem_method_call_recursive>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
  42. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | |void| | :ref:`clear_buttons<class_TreeItem_method_clear_buttons>`\ (\ ) |
  44. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | |void| | :ref:`clear_custom_bg_color<class_TreeItem_method_clear_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |
  46. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | |void| | :ref:`clear_custom_color<class_TreeItem_method_clear_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |
  48. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`TreeItem<class_TreeItem>` | :ref:`create_child<class_TreeItem_method_create_child>`\ (\ index\: :ref:`int<class_int>` = -1\ ) |
  50. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | |void| | :ref:`deselect<class_TreeItem_method_deselect>`\ (\ column\: :ref:`int<class_int>`\ ) |
  52. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | |void| | :ref:`erase_button<class_TreeItem_method_erase_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |
  54. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`get_auto_translate_mode<class_TreeItem_method_get_auto_translate_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  56. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`get_autowrap_mode<class_TreeItem_method_get_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  58. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_button<class_TreeItem_method_get_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
  60. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :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| |
  62. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :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| |
  64. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`get_button_count<class_TreeItem_method_get_button_count>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  66. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :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| |
  68. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :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| |
  70. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` | :ref:`get_cell_mode<class_TreeItem_method_get_cell_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  72. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_child<class_TreeItem_method_get_child>`\ (\ index\: :ref:`int<class_int>`\ ) |
  74. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`int<class_int>` | :ref:`get_child_count<class_TreeItem_method_get_child_count>`\ (\ ) |
  76. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] | :ref:`get_children<class_TreeItem_method_get_children>`\ (\ ) |
  78. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`Color<class_Color>` | :ref:`get_custom_bg_color<class_TreeItem_method_get_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  80. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`Color<class_Color>` | :ref:`get_custom_color<class_TreeItem_method_get_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  82. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`Callable<class_Callable>` | :ref:`get_custom_draw_callback<class_TreeItem_method_get_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  84. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`Font<class_Font>` | :ref:`get_custom_font<class_TreeItem_method_get_custom_font>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  86. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`int<class_int>` | :ref:`get_custom_font_size<class_TreeItem_method_get_custom_font_size>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  88. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`String<class_String>` | :ref:`get_description<class_TreeItem_method_get_description>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  90. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`bool<class_bool>` | :ref:`get_expand_right<class_TreeItem_method_get_expand_right>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  92. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_first_child<class_TreeItem_method_get_first_child>`\ (\ ) |const| |
  94. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_TreeItem_method_get_icon>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  96. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`int<class_int>` | :ref:`get_icon_max_width<class_TreeItem_method_get_icon_max_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  98. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`Color<class_Color>` | :ref:`get_icon_modulate<class_TreeItem_method_get_icon_modulate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  100. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon_overlay<class_TreeItem_method_get_icon_overlay>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  102. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`Rect2<class_Rect2>` | :ref:`get_icon_region<class_TreeItem_method_get_icon_region>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  104. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`int<class_int>` | :ref:`get_index<class_TreeItem_method_get_index>`\ (\ ) |
  106. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`String<class_String>` | :ref:`get_language<class_TreeItem_method_get_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  108. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`Variant<class_Variant>` | :ref:`get_metadata<class_TreeItem_method_get_metadata>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  110. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next<class_TreeItem_method_get_next>`\ (\ ) |const| |
  112. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_in_tree<class_TreeItem_method_get_next_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
  114. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_visible<class_TreeItem_method_get_next_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
  116. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_parent<class_TreeItem_method_get_parent>`\ (\ ) |const| |
  118. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev<class_TreeItem_method_get_prev>`\ (\ ) |
  120. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_in_tree<class_TreeItem_method_get_prev_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
  122. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_visible<class_TreeItem_method_get_prev_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
  124. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`float<class_float>` | :ref:`get_range<class_TreeItem_method_get_range>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  126. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`Dictionary<class_Dictionary>` | :ref:`get_range_config<class_TreeItem_method_get_range_config>`\ (\ column\: :ref:`int<class_int>`\ ) |
  128. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :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| |
  130. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :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| |
  132. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`String<class_String>` | :ref:`get_suffix<class_TreeItem_method_get_suffix>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  134. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :ref:`String<class_String>` | :ref:`get_text<class_TreeItem_method_get_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  136. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_text_alignment<class_TreeItem_method_get_text_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  138. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_text_direction<class_TreeItem_method_get_text_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  140. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`get_text_overrun_behavior<class_TreeItem_method_get_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  142. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`String<class_String>` | :ref:`get_tooltip_text<class_TreeItem_method_get_tooltip_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  144. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`Tree<class_Tree>` | :ref:`get_tree<class_TreeItem_method_get_tree>`\ (\ ) |const| |
  146. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :ref:`bool<class_bool>` | :ref:`is_any_collapsed<class_TreeItem_method_is_any_collapsed>`\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) |
  148. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | :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| |
  150. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`bool<class_bool>` | :ref:`is_checked<class_TreeItem_method_is_checked>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  152. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`bool<class_bool>` | :ref:`is_custom_set_as_button<class_TreeItem_method_is_custom_set_as_button>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  154. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`bool<class_bool>` | :ref:`is_edit_multiline<class_TreeItem_method_is_edit_multiline>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  156. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`bool<class_bool>` | :ref:`is_editable<class_TreeItem_method_is_editable>`\ (\ column\: :ref:`int<class_int>`\ ) |
  158. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | :ref:`bool<class_bool>` | :ref:`is_indeterminate<class_TreeItem_method_is_indeterminate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  160. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`bool<class_bool>` | :ref:`is_selectable<class_TreeItem_method_is_selectable>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  162. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | :ref:`bool<class_bool>` | :ref:`is_selected<class_TreeItem_method_is_selected>`\ (\ column\: :ref:`int<class_int>`\ ) |
  164. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_TreeItem_method_is_visible_in_tree>`\ (\ ) |const| |
  166. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | |void| | :ref:`move_after<class_TreeItem_method_move_after>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) |
  168. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | |void| | :ref:`move_before<class_TreeItem_method_move_before>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) |
  170. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | |void| | :ref:`propagate_check<class_TreeItem_method_propagate_check>`\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) |
  172. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | |void| | :ref:`remove_child<class_TreeItem_method_remove_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) |
  174. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | |void| | :ref:`select<class_TreeItem_method_select>`\ (\ column\: :ref:`int<class_int>`\ ) |
  176. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | |void| | :ref:`set_auto_translate_mode<class_TreeItem_method_set_auto_translate_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) |
  178. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | |void| | :ref:`set_autowrap_mode<class_TreeItem_method_set_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) |
  180. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | |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>`\ ) |
  182. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | |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>`\ ) |
  184. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | |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>`\ ) |
  186. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | |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>`\ ) |
  188. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | |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>`\ ) |
  190. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | |void| | :ref:`set_cell_mode<class_TreeItem_method_set_cell_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) |
  192. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | |void| | :ref:`set_checked<class_TreeItem_method_set_checked>`\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) |
  194. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | |void| | :ref:`set_collapsed_recursive<class_TreeItem_method_set_collapsed_recursive>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  196. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | |void| | :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
  198. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | |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\ ) |
  200. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | |void| | :ref:`set_custom_color<class_TreeItem_method_set_custom_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
  202. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | |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>`\ ) |
  204. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | |void| | :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  206. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | |void| | :ref:`set_custom_font<class_TreeItem_method_set_custom_font>`\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) |
  208. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | |void| | :ref:`set_custom_font_size<class_TreeItem_method_set_custom_font_size>`\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) |
  210. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | |void| | :ref:`set_description<class_TreeItem_method_set_description>`\ (\ column\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) |
  212. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | |void| | :ref:`set_edit_multiline<class_TreeItem_method_set_edit_multiline>`\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) |
  214. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | |void| | :ref:`set_editable<class_TreeItem_method_set_editable>`\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
  216. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | |void| | :ref:`set_expand_right<class_TreeItem_method_set_expand_right>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
  218. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | |void| | :ref:`set_icon<class_TreeItem_method_set_icon>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
  220. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | |void| | :ref:`set_icon_max_width<class_TreeItem_method_set_icon_max_width>`\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) |
  222. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | |void| | :ref:`set_icon_modulate<class_TreeItem_method_set_icon_modulate>`\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) |
  224. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | |void| | :ref:`set_icon_overlay<class_TreeItem_method_set_icon_overlay>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
  226. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | |void| | :ref:`set_icon_region<class_TreeItem_method_set_icon_region>`\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) |
  228. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | |void| | :ref:`set_indeterminate<class_TreeItem_method_set_indeterminate>`\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) |
  230. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | |void| | :ref:`set_language<class_TreeItem_method_set_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
  232. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | |void| | :ref:`set_metadata<class_TreeItem_method_set_metadata>`\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) |
  234. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | |void| | :ref:`set_range<class_TreeItem_method_set_range>`\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
  236. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | |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\ ) |
  238. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | |void| | :ref:`set_selectable<class_TreeItem_method_set_selectable>`\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) |
  240. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | |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>`\ ) |
  242. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | |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>`\ ) |
  244. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | |void| | :ref:`set_suffix<class_TreeItem_method_set_suffix>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
  246. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | |void| | :ref:`set_text<class_TreeItem_method_set_text>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
  248. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | |void| | :ref:`set_text_alignment<class_TreeItem_method_set_text_alignment>`\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) |
  250. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. | |void| | :ref:`set_text_direction<class_TreeItem_method_set_text_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
  252. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  253. | |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>`\ ) |
  254. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  255. | |void| | :ref:`set_tooltip_text<class_TreeItem_method_set_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  256. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  257. | |void| | :ref:`uncollapse_tree<class_TreeItem_method_uncollapse_tree>`\ (\ ) |
  258. +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  259. .. rst-class:: classref-section-separator
  260. ----
  261. .. rst-class:: classref-descriptions-group
  262. Enumerations
  263. ------------
  264. .. _enum_TreeItem_TreeCellMode:
  265. .. rst-class:: classref-enumeration
  266. enum **TreeCellMode**: :ref:`๐Ÿ”—<enum_TreeItem_TreeCellMode>`
  267. .. _class_TreeItem_constant_CELL_MODE_STRING:
  268. .. rst-class:: classref-enumeration-constant
  269. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_STRING** = ``0``
  270. Cell shows a string label, optionally with an icon. When editable, the text can be edited using a :ref:`LineEdit<class_LineEdit>`, or a :ref:`TextEdit<class_TextEdit>` popup if :ref:`set_edit_multiline()<class_TreeItem_method_set_edit_multiline>` is used.
  271. .. _class_TreeItem_constant_CELL_MODE_CHECK:
  272. .. rst-class:: classref-enumeration-constant
  273. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CHECK** = ``1``
  274. Cell shows a checkbox, optionally with text and an icon. The checkbox can be pressed, released, or indeterminate (via :ref:`set_indeterminate()<class_TreeItem_method_set_indeterminate>`). The checkbox can't be clicked unless the cell is editable.
  275. .. _class_TreeItem_constant_CELL_MODE_RANGE:
  276. .. rst-class:: classref-enumeration-constant
  277. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_RANGE** = ``2``
  278. Cell shows a numeric range. When editable, it can be edited using a range slider. Use :ref:`set_range()<class_TreeItem_method_set_range>` to set the value and :ref:`set_range_config()<class_TreeItem_method_set_range_config>` to configure the range.
  279. This cell can also be used in a text dropdown mode when you assign a text with :ref:`set_text()<class_TreeItem_method_set_text>`. Separate options with a comma, e.g. ``"Option1,Option2,Option3"``.
  280. .. _class_TreeItem_constant_CELL_MODE_ICON:
  281. .. rst-class:: classref-enumeration-constant
  282. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_ICON** = ``3``
  283. Cell shows an icon. It can't be edited nor display text. The icon is always centered within the cell.
  284. .. _class_TreeItem_constant_CELL_MODE_CUSTOM:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CUSTOM** = ``4``
  287. Cell shows as a clickable button. It will display an arrow similar to :ref:`OptionButton<class_OptionButton>`, but doesn't feature a dropdown (for that you can use :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`). Clicking the button emits the :ref:`Tree.item_edited<class_Tree_signal_item_edited>` signal. The button is flat by default, you can use :ref:`set_custom_as_button()<class_TreeItem_method_set_custom_as_button>` to display it with a :ref:`StyleBox<class_StyleBox>`.
  288. This mode also supports custom drawing using :ref:`set_custom_draw_callback()<class_TreeItem_method_set_custom_draw_callback>`.
  289. .. rst-class:: classref-section-separator
  290. ----
  291. .. rst-class:: classref-descriptions-group
  292. Property Descriptions
  293. ---------------------
  294. .. _class_TreeItem_property_collapsed:
  295. .. rst-class:: classref-property
  296. :ref:`bool<class_bool>` **collapsed** :ref:`๐Ÿ”—<class_TreeItem_property_collapsed>`
  297. .. rst-class:: classref-property-setget
  298. - |void| **set_collapsed**\ (\ value\: :ref:`bool<class_bool>`\ )
  299. - :ref:`bool<class_bool>` **is_collapsed**\ (\ )
  300. If ``true``, the TreeItem is collapsed.
  301. .. rst-class:: classref-item-separator
  302. ----
  303. .. _class_TreeItem_property_custom_minimum_height:
  304. .. rst-class:: classref-property
  305. :ref:`int<class_int>` **custom_minimum_height** :ref:`๐Ÿ”—<class_TreeItem_property_custom_minimum_height>`
  306. .. rst-class:: classref-property-setget
  307. - |void| **set_custom_minimum_height**\ (\ value\: :ref:`int<class_int>`\ )
  308. - :ref:`int<class_int>` **get_custom_minimum_height**\ (\ )
  309. The custom minimum height.
  310. .. rst-class:: classref-item-separator
  311. ----
  312. .. _class_TreeItem_property_disable_folding:
  313. .. rst-class:: classref-property
  314. :ref:`bool<class_bool>` **disable_folding** :ref:`๐Ÿ”—<class_TreeItem_property_disable_folding>`
  315. .. rst-class:: classref-property-setget
  316. - |void| **set_disable_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
  317. - :ref:`bool<class_bool>` **is_folding_disabled**\ (\ )
  318. If ``true``, folding is disabled for this TreeItem.
  319. .. rst-class:: classref-item-separator
  320. ----
  321. .. _class_TreeItem_property_visible:
  322. .. rst-class:: classref-property
  323. :ref:`bool<class_bool>` **visible** :ref:`๐Ÿ”—<class_TreeItem_property_visible>`
  324. .. rst-class:: classref-property-setget
  325. - |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  326. - :ref:`bool<class_bool>` **is_visible**\ (\ )
  327. If ``true``, the **TreeItem** is visible (default).
  328. Note that if a **TreeItem** is set to not be visible, none of its children will be visible either.
  329. .. rst-class:: classref-section-separator
  330. ----
  331. .. rst-class:: classref-descriptions-group
  332. Method Descriptions
  333. -------------------
  334. .. _class_TreeItem_method_add_button:
  335. .. rst-class:: classref-method
  336. |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>`
  337. Adds a button with :ref:`Texture2D<class_Texture2D>` ``button`` to the end of the cell at column ``column``. The ``id`` is used to identify the button in the according :ref:`Tree.button_clicked<class_Tree_signal_button_clicked>` signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count()<class_TreeItem_method_get_button_count>` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. ``description`` is used as the button description for assistive apps.
  338. .. rst-class:: classref-item-separator
  339. ----
  340. .. _class_TreeItem_method_add_child:
  341. .. rst-class:: classref-method
  342. |void| **add_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_add_child>`
  343. Adds a previously unparented **TreeItem** as a direct child of this one. The ``child`` item must not be a part of any :ref:`Tree<class_Tree>` or parented to any **TreeItem**. See also :ref:`remove_child()<class_TreeItem_method_remove_child>`.
  344. .. rst-class:: classref-item-separator
  345. ----
  346. .. _class_TreeItem_method_call_recursive:
  347. .. rst-class:: classref-method
  348. |void| **call_recursive**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`๐Ÿ”—<class_TreeItem_method_call_recursive>`
  349. Calls the ``method`` on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
  350. .. rst-class:: classref-item-separator
  351. ----
  352. .. _class_TreeItem_method_clear_buttons:
  353. .. rst-class:: classref-method
  354. |void| **clear_buttons**\ (\ ) :ref:`๐Ÿ”—<class_TreeItem_method_clear_buttons>`
  355. Removes all buttons from all columns of this item.
  356. .. rst-class:: classref-item-separator
  357. ----
  358. .. _class_TreeItem_method_clear_custom_bg_color:
  359. .. rst-class:: classref-method
  360. |void| **clear_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_clear_custom_bg_color>`
  361. Resets the background color for the given column to default.
  362. .. rst-class:: classref-item-separator
  363. ----
  364. .. _class_TreeItem_method_clear_custom_color:
  365. .. rst-class:: classref-method
  366. |void| **clear_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_clear_custom_color>`
  367. Resets the color for the given column to default.
  368. .. rst-class:: classref-item-separator
  369. ----
  370. .. _class_TreeItem_method_create_child:
  371. .. rst-class:: classref-method
  372. :ref:`TreeItem<class_TreeItem>` **create_child**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_TreeItem_method_create_child>`
  373. Creates an item and adds it as a child.
  374. The new item will be inserted as position ``index`` (the default value ``-1`` means the last position), or it will be the last child if ``index`` is higher than the child count.
  375. .. rst-class:: classref-item-separator
  376. ----
  377. .. _class_TreeItem_method_deselect:
  378. .. rst-class:: classref-method
  379. |void| **deselect**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_deselect>`
  380. Deselects the given column.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _class_TreeItem_method_erase_button:
  384. .. rst-class:: classref-method
  385. |void| **erase_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_erase_button>`
  386. Removes the button at index ``button_index`` in column ``column``.
  387. .. rst-class:: classref-item-separator
  388. ----
  389. .. _class_TreeItem_method_get_auto_translate_mode:
  390. .. rst-class:: classref-method
  391. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_auto_translate_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_auto_translate_mode>`
  392. Returns the column's auto translate mode.
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _class_TreeItem_method_get_autowrap_mode:
  396. .. rst-class:: classref-method
  397. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_autowrap_mode>`
  398. Returns the text autowrap mode in the given ``column``. By default it is :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_TreeItem_method_get_button:
  402. .. rst-class:: classref-method
  403. :ref:`Texture2D<class_Texture2D>` **get_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_button>`
  404. Returns the :ref:`Texture2D<class_Texture2D>` of the button at index ``button_index`` in column ``column``.
  405. .. rst-class:: classref-item-separator
  406. ----
  407. .. _class_TreeItem_method_get_button_by_id:
  408. .. rst-class:: classref-method
  409. :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>`
  410. Returns the button index if there is a button with ID ``id`` in column ``column``, otherwise returns -1.
  411. .. rst-class:: classref-item-separator
  412. ----
  413. .. _class_TreeItem_method_get_button_color:
  414. .. rst-class:: classref-method
  415. :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>`
  416. Returns the color of the button with ID ``id`` in column ``column``. If the specified button does not exist, returns :ref:`Color.BLACK<class_Color_constant_BLACK>`.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_TreeItem_method_get_button_count:
  420. .. rst-class:: classref-method
  421. :ref:`int<class_int>` **get_button_count**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_button_count>`
  422. Returns the number of buttons in column ``column``.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_TreeItem_method_get_button_id:
  426. .. rst-class:: classref-method
  427. :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>`
  428. Returns the ID for the button at index ``button_index`` in column ``column``.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_TreeItem_method_get_button_tooltip_text:
  432. .. rst-class:: classref-method
  433. :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>`
  434. Returns the tooltip text for the button at index ``button_index`` in column ``column``.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_TreeItem_method_get_cell_mode:
  438. .. rst-class:: classref-method
  439. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **get_cell_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_cell_mode>`
  440. Returns the column's cell mode.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_TreeItem_method_get_child:
  444. .. rst-class:: classref-method
  445. :ref:`TreeItem<class_TreeItem>` **get_child**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_child>`
  446. Returns a child item by its ``index`` (see :ref:`get_child_count()<class_TreeItem_method_get_child_count>`). This method is often used for iterating all children of an item.
  447. Negative indices access the children from the last one.
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_TreeItem_method_get_child_count:
  451. .. rst-class:: classref-method
  452. :ref:`int<class_int>` **get_child_count**\ (\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_child_count>`
  453. Returns the number of child items.
  454. .. rst-class:: classref-item-separator
  455. ----
  456. .. _class_TreeItem_method_get_children:
  457. .. rst-class:: classref-method
  458. :ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] **get_children**\ (\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_children>`
  459. Returns an array of references to the item's children.
  460. .. rst-class:: classref-item-separator
  461. ----
  462. .. _class_TreeItem_method_get_custom_bg_color:
  463. .. rst-class:: classref-method
  464. :ref:`Color<class_Color>` **get_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_custom_bg_color>`
  465. Returns the custom background color of column ``column``.
  466. .. rst-class:: classref-item-separator
  467. ----
  468. .. _class_TreeItem_method_get_custom_color:
  469. .. rst-class:: classref-method
  470. :ref:`Color<class_Color>` **get_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_custom_color>`
  471. Returns the custom color of column ``column``.
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _class_TreeItem_method_get_custom_draw_callback:
  475. .. rst-class:: classref-method
  476. :ref:`Callable<class_Callable>` **get_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_custom_draw_callback>`
  477. Returns the custom callback of column ``column``.
  478. .. rst-class:: classref-item-separator
  479. ----
  480. .. _class_TreeItem_method_get_custom_font:
  481. .. rst-class:: classref-method
  482. :ref:`Font<class_Font>` **get_custom_font**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_custom_font>`
  483. Returns custom font used to draw text in the column ``column``.
  484. .. rst-class:: classref-item-separator
  485. ----
  486. .. _class_TreeItem_method_get_custom_font_size:
  487. .. rst-class:: classref-method
  488. :ref:`int<class_int>` **get_custom_font_size**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_custom_font_size>`
  489. Returns custom font size used to draw text in the column ``column``.
  490. .. rst-class:: classref-item-separator
  491. ----
  492. .. _class_TreeItem_method_get_description:
  493. .. rst-class:: classref-method
  494. :ref:`String<class_String>` **get_description**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_description>`
  495. Returns the given column's description for assistive apps.
  496. .. rst-class:: classref-item-separator
  497. ----
  498. .. _class_TreeItem_method_get_expand_right:
  499. .. rst-class:: classref-method
  500. :ref:`bool<class_bool>` **get_expand_right**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_expand_right>`
  501. Returns ``true`` if ``expand_right`` is set.
  502. .. rst-class:: classref-item-separator
  503. ----
  504. .. _class_TreeItem_method_get_first_child:
  505. .. rst-class:: classref-method
  506. :ref:`TreeItem<class_TreeItem>` **get_first_child**\ (\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_first_child>`
  507. Returns the TreeItem's first child.
  508. .. rst-class:: classref-item-separator
  509. ----
  510. .. _class_TreeItem_method_get_icon:
  511. .. rst-class:: classref-method
  512. :ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_icon>`
  513. Returns the given column's icon :ref:`Texture2D<class_Texture2D>`. Error if no icon is set.
  514. .. rst-class:: classref-item-separator
  515. ----
  516. .. _class_TreeItem_method_get_icon_max_width:
  517. .. rst-class:: classref-method
  518. :ref:`int<class_int>` **get_icon_max_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_icon_max_width>`
  519. Returns the maximum allowed width of the icon in the given ``column``.
  520. .. rst-class:: classref-item-separator
  521. ----
  522. .. _class_TreeItem_method_get_icon_modulate:
  523. .. rst-class:: classref-method
  524. :ref:`Color<class_Color>` **get_icon_modulate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_icon_modulate>`
  525. Returns the :ref:`Color<class_Color>` modulating the column's icon.
  526. .. rst-class:: classref-item-separator
  527. ----
  528. .. _class_TreeItem_method_get_icon_overlay:
  529. .. rst-class:: classref-method
  530. :ref:`Texture2D<class_Texture2D>` **get_icon_overlay**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_icon_overlay>`
  531. Returns the given column's icon overlay :ref:`Texture2D<class_Texture2D>`.
  532. .. rst-class:: classref-item-separator
  533. ----
  534. .. _class_TreeItem_method_get_icon_region:
  535. .. rst-class:: classref-method
  536. :ref:`Rect2<class_Rect2>` **get_icon_region**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_icon_region>`
  537. Returns the icon :ref:`Texture2D<class_Texture2D>` region as :ref:`Rect2<class_Rect2>`.
  538. .. rst-class:: classref-item-separator
  539. ----
  540. .. _class_TreeItem_method_get_index:
  541. .. rst-class:: classref-method
  542. :ref:`int<class_int>` **get_index**\ (\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_index>`
  543. Returns the node's order in the tree. For example, if called on the first child item the position is ``0``.
  544. .. rst-class:: classref-item-separator
  545. ----
  546. .. _class_TreeItem_method_get_language:
  547. .. rst-class:: classref-method
  548. :ref:`String<class_String>` **get_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_language>`
  549. Returns item's text language code.
  550. .. rst-class:: classref-item-separator
  551. ----
  552. .. _class_TreeItem_method_get_metadata:
  553. .. rst-class:: classref-method
  554. :ref:`Variant<class_Variant>` **get_metadata**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_metadata>`
  555. Returns the metadata value that was set for the given column using :ref:`set_metadata()<class_TreeItem_method_set_metadata>`.
  556. .. rst-class:: classref-item-separator
  557. ----
  558. .. _class_TreeItem_method_get_next:
  559. .. rst-class:: classref-method
  560. :ref:`TreeItem<class_TreeItem>` **get_next**\ (\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_next>`
  561. Returns the next sibling TreeItem in the tree or a ``null`` object if there is none.
  562. .. rst-class:: classref-item-separator
  563. ----
  564. .. _class_TreeItem_method_get_next_in_tree:
  565. .. rst-class:: classref-method
  566. :ref:`TreeItem<class_TreeItem>` **get_next_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_next_in_tree>`
  567. Returns the next TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none.
  568. If ``wrap`` is enabled, the method will wrap around to the first element in the tree when called on the last element, otherwise it returns ``null``.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_TreeItem_method_get_next_visible:
  572. .. rst-class:: classref-method
  573. :ref:`TreeItem<class_TreeItem>` **get_next_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_next_visible>`
  574. Returns the next visible TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none.
  575. If ``wrap`` is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns ``null``.
  576. .. rst-class:: classref-item-separator
  577. ----
  578. .. _class_TreeItem_method_get_parent:
  579. .. rst-class:: classref-method
  580. :ref:`TreeItem<class_TreeItem>` **get_parent**\ (\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_parent>`
  581. Returns the parent TreeItem or a ``null`` object if there is none.
  582. .. rst-class:: classref-item-separator
  583. ----
  584. .. _class_TreeItem_method_get_prev:
  585. .. rst-class:: classref-method
  586. :ref:`TreeItem<class_TreeItem>` **get_prev**\ (\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_prev>`
  587. Returns the previous sibling TreeItem in the tree or a ``null`` object if there is none.
  588. .. rst-class:: classref-item-separator
  589. ----
  590. .. _class_TreeItem_method_get_prev_in_tree:
  591. .. rst-class:: classref-method
  592. :ref:`TreeItem<class_TreeItem>` **get_prev_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_prev_in_tree>`
  593. Returns the previous TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none.
  594. If ``wrap`` is enabled, the method will wrap around to the last element in the tree when called on the first visible element, otherwise it returns ``null``.
  595. .. rst-class:: classref-item-separator
  596. ----
  597. .. _class_TreeItem_method_get_prev_visible:
  598. .. rst-class:: classref-method
  599. :ref:`TreeItem<class_TreeItem>` **get_prev_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_prev_visible>`
  600. Returns the previous visible sibling TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none.
  601. If ``wrap`` is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns ``null``.
  602. .. rst-class:: classref-item-separator
  603. ----
  604. .. _class_TreeItem_method_get_range:
  605. .. rst-class:: classref-method
  606. :ref:`float<class_float>` **get_range**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_range>`
  607. Returns the value of a :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` column.
  608. .. rst-class:: classref-item-separator
  609. ----
  610. .. _class_TreeItem_method_get_range_config:
  611. .. rst-class:: classref-method
  612. :ref:`Dictionary<class_Dictionary>` **get_range_config**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_get_range_config>`
  613. Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
  614. .. rst-class:: classref-item-separator
  615. ----
  616. .. _class_TreeItem_method_get_structured_text_bidi_override:
  617. .. rst-class:: classref-method
  618. :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>`
  619. Returns the BiDi algorithm override set for this cell.
  620. .. rst-class:: classref-item-separator
  621. ----
  622. .. _class_TreeItem_method_get_structured_text_bidi_override_options:
  623. .. rst-class:: classref-method
  624. :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>`
  625. Returns the additional BiDi options set for this cell.
  626. .. rst-class:: classref-item-separator
  627. ----
  628. .. _class_TreeItem_method_get_suffix:
  629. .. rst-class:: classref-method
  630. :ref:`String<class_String>` **get_suffix**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_suffix>`
  631. Gets the suffix string shown after the column value.
  632. .. rst-class:: classref-item-separator
  633. ----
  634. .. _class_TreeItem_method_get_text:
  635. .. rst-class:: classref-method
  636. :ref:`String<class_String>` **get_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_text>`
  637. Returns the given column's text.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_TreeItem_method_get_text_alignment:
  641. .. rst-class:: classref-method
  642. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_text_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_text_alignment>`
  643. Returns the given column's text alignment.
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_TreeItem_method_get_text_direction:
  647. .. rst-class:: classref-method
  648. :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_text_direction>`
  649. Returns item's text base writing direction.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_TreeItem_method_get_text_overrun_behavior:
  653. .. rst-class:: classref-method
  654. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_text_overrun_behavior>`
  655. Returns the clipping behavior when the text exceeds the item's bounding rectangle in the given ``column``. By default it is :ref:`TextServer.OVERRUN_TRIM_ELLIPSIS<class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS>`.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_TreeItem_method_get_tooltip_text:
  659. .. rst-class:: classref-method
  660. :ref:`String<class_String>` **get_tooltip_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_tooltip_text>`
  661. Returns the given column's tooltip text.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_TreeItem_method_get_tree:
  665. .. rst-class:: classref-method
  666. :ref:`Tree<class_Tree>` **get_tree**\ (\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_get_tree>`
  667. Returns the :ref:`Tree<class_Tree>` that owns this TreeItem.
  668. .. rst-class:: classref-item-separator
  669. ----
  670. .. _class_TreeItem_method_is_any_collapsed:
  671. .. rst-class:: classref-method
  672. :ref:`bool<class_bool>` **is_any_collapsed**\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_TreeItem_method_is_any_collapsed>`
  673. Returns ``true`` if this **TreeItem**, or any of its descendants, is collapsed.
  674. If ``only_visible`` is ``true`` it ignores non-visible **TreeItem**\ s.
  675. .. rst-class:: classref-item-separator
  676. ----
  677. .. _class_TreeItem_method_is_button_disabled:
  678. .. rst-class:: classref-method
  679. :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>`
  680. Returns ``true`` if the button at index ``button_index`` for the given ``column`` is disabled.
  681. .. rst-class:: classref-item-separator
  682. ----
  683. .. _class_TreeItem_method_is_checked:
  684. .. rst-class:: classref-method
  685. :ref:`bool<class_bool>` **is_checked**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_is_checked>`
  686. Returns ``true`` if the given ``column`` is checked.
  687. .. rst-class:: classref-item-separator
  688. ----
  689. .. _class_TreeItem_method_is_custom_set_as_button:
  690. .. rst-class:: classref-method
  691. :ref:`bool<class_bool>` **is_custom_set_as_button**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_is_custom_set_as_button>`
  692. Returns ``true`` if the cell was made into a button with :ref:`set_custom_as_button()<class_TreeItem_method_set_custom_as_button>`.
  693. .. rst-class:: classref-item-separator
  694. ----
  695. .. _class_TreeItem_method_is_edit_multiline:
  696. .. rst-class:: classref-method
  697. :ref:`bool<class_bool>` **is_edit_multiline**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_is_edit_multiline>`
  698. Returns ``true`` if the given ``column`` is multiline editable.
  699. .. rst-class:: classref-item-separator
  700. ----
  701. .. _class_TreeItem_method_is_editable:
  702. .. rst-class:: classref-method
  703. :ref:`bool<class_bool>` **is_editable**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_is_editable>`
  704. Returns ``true`` if the given ``column`` is editable.
  705. .. rst-class:: classref-item-separator
  706. ----
  707. .. _class_TreeItem_method_is_indeterminate:
  708. .. rst-class:: classref-method
  709. :ref:`bool<class_bool>` **is_indeterminate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_is_indeterminate>`
  710. Returns ``true`` if the given ``column`` is indeterminate.
  711. .. rst-class:: classref-item-separator
  712. ----
  713. .. _class_TreeItem_method_is_selectable:
  714. .. rst-class:: classref-method
  715. :ref:`bool<class_bool>` **is_selectable**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_is_selectable>`
  716. Returns ``true`` if the given ``column`` is selectable.
  717. .. rst-class:: classref-item-separator
  718. ----
  719. .. _class_TreeItem_method_is_selected:
  720. .. rst-class:: classref-method
  721. :ref:`bool<class_bool>` **is_selected**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_is_selected>`
  722. Returns ``true`` if the given ``column`` is selected.
  723. .. rst-class:: classref-item-separator
  724. ----
  725. .. _class_TreeItem_method_is_visible_in_tree:
  726. .. rst-class:: classref-method
  727. :ref:`bool<class_bool>` **is_visible_in_tree**\ (\ ) |const| :ref:`๐Ÿ”—<class_TreeItem_method_is_visible_in_tree>`
  728. Returns ``true`` if :ref:`visible<class_TreeItem_property_visible>` is ``true`` and all its ancestors are also visible.
  729. .. rst-class:: classref-item-separator
  730. ----
  731. .. _class_TreeItem_method_move_after:
  732. .. rst-class:: classref-method
  733. |void| **move_after**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_move_after>`
  734. Moves this TreeItem right after the given ``item``.
  735. \ **Note:** You can't move to the root or move the root.
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_TreeItem_method_move_before:
  739. .. rst-class:: classref-method
  740. |void| **move_before**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_move_before>`
  741. Moves this TreeItem right before the given ``item``.
  742. \ **Note:** You can't move to the root or move the root.
  743. .. rst-class:: classref-item-separator
  744. ----
  745. .. _class_TreeItem_method_propagate_check:
  746. .. rst-class:: classref-method
  747. |void| **propagate_check**\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) :ref:`๐Ÿ”—<class_TreeItem_method_propagate_check>`
  748. Propagates this item's checked status to its children and parents for the given ``column``. It is possible to process the items affected by this method call by connecting to :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>`. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If ``emit_signal`` is ``false``, then :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>` will not be emitted.
  749. .. rst-class:: classref-item-separator
  750. ----
  751. .. _class_TreeItem_method_remove_child:
  752. .. rst-class:: classref-method
  753. |void| **remove_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_remove_child>`
  754. Removes the given child **TreeItem** and all its children from the :ref:`Tree<class_Tree>`. Note that it doesn't free the item from memory, so it can be reused later (see :ref:`add_child()<class_TreeItem_method_add_child>`). To completely remove a **TreeItem** use :ref:`Object.free()<class_Object_method_free>`.
  755. \ **Note:** If you want to move a child from one :ref:`Tree<class_Tree>` to another, then instead of removing and adding it manually you can use :ref:`move_before()<class_TreeItem_method_move_before>` or :ref:`move_after()<class_TreeItem_method_move_after>`.
  756. .. rst-class:: classref-item-separator
  757. ----
  758. .. _class_TreeItem_method_select:
  759. .. rst-class:: classref-method
  760. |void| **select**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_select>`
  761. Selects the given ``column``.
  762. .. rst-class:: classref-item-separator
  763. ----
  764. .. _class_TreeItem_method_set_auto_translate_mode:
  765. .. rst-class:: classref-method
  766. |void| **set_auto_translate_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_auto_translate_mode>`
  767. Sets the given column's auto translate mode to ``mode``.
  768. All columns use :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>` by default, which uses the same auto translate mode as the :ref:`Tree<class_Tree>` itself.
  769. .. rst-class:: classref-item-separator
  770. ----
  771. .. _class_TreeItem_method_set_autowrap_mode:
  772. .. rst-class:: classref-method
  773. |void| **set_autowrap_mode**\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_autowrap_mode>`
  774. Sets the autowrap mode in the given ``column``. If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the cell's bounding rectangle.
  775. .. rst-class:: classref-item-separator
  776. ----
  777. .. _class_TreeItem_method_set_button:
  778. .. rst-class:: classref-method
  779. |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>`
  780. Sets the given column's button :ref:`Texture2D<class_Texture2D>` at index ``button_index`` to ``button``.
  781. .. rst-class:: classref-item-separator
  782. ----
  783. .. _class_TreeItem_method_set_button_color:
  784. .. rst-class:: classref-method
  785. |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>`
  786. Sets the given column's button color at index ``button_index`` to ``color``.
  787. .. rst-class:: classref-item-separator
  788. ----
  789. .. _class_TreeItem_method_set_button_description:
  790. .. rst-class:: classref-method
  791. |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>`
  792. Sets the given column's button description at index ``button_index`` for assistive apps.
  793. .. rst-class:: classref-item-separator
  794. ----
  795. .. _class_TreeItem_method_set_button_disabled:
  796. .. rst-class:: classref-method
  797. |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>`
  798. If ``true``, disables the button at index ``button_index`` in the given ``column``.
  799. .. rst-class:: classref-item-separator
  800. ----
  801. .. _class_TreeItem_method_set_button_tooltip_text:
  802. .. rst-class:: classref-method
  803. |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>`
  804. Sets the tooltip text for the button at index ``button_index`` in the given ``column``.
  805. .. rst-class:: classref-item-separator
  806. ----
  807. .. _class_TreeItem_method_set_cell_mode:
  808. .. rst-class:: classref-method
  809. |void| **set_cell_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_cell_mode>`
  810. Sets the given column's cell mode to ``mode``. This determines how the cell is displayed and edited.
  811. .. rst-class:: classref-item-separator
  812. ----
  813. .. _class_TreeItem_method_set_checked:
  814. .. rst-class:: classref-method
  815. |void| **set_checked**\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_checked>`
  816. If ``checked`` is ``true``, the given ``column`` is checked. Clears column's indeterminate status.
  817. .. rst-class:: classref-item-separator
  818. ----
  819. .. _class_TreeItem_method_set_collapsed_recursive:
  820. .. rst-class:: classref-method
  821. |void| **set_collapsed_recursive**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_collapsed_recursive>`
  822. Collapses or uncollapses this **TreeItem** and all the descendants of this item.
  823. .. rst-class:: classref-item-separator
  824. ----
  825. .. _class_TreeItem_method_set_custom_as_button:
  826. .. rst-class:: classref-method
  827. |void| **set_custom_as_button**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_custom_as_button>`
  828. Makes a cell with :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` display as a non-flat button with a :ref:`StyleBox<class_StyleBox>`.
  829. .. rst-class:: classref-item-separator
  830. ----
  831. .. _class_TreeItem_method_set_custom_bg_color:
  832. .. rst-class:: classref-method
  833. |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>`
  834. Sets the given column's custom background color and whether to just use it as an outline.
  835. .. rst-class:: classref-item-separator
  836. ----
  837. .. _class_TreeItem_method_set_custom_color:
  838. .. rst-class:: classref-method
  839. |void| **set_custom_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_custom_color>`
  840. Sets the given column's custom color.
  841. .. rst-class:: classref-item-separator
  842. ----
  843. .. _class_TreeItem_method_set_custom_draw:
  844. .. rst-class:: classref-method
  845. |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>`
  846. **Deprecated:** Use :ref:`set_custom_draw_callback()<class_TreeItem_method_set_custom_draw_callback>` instead.
  847. Sets the given column's custom draw callback to the ``callback`` method on ``object``.
  848. The method named ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2<class_Rect2>`.
  849. .. rst-class:: classref-item-separator
  850. ----
  851. .. _class_TreeItem_method_set_custom_draw_callback:
  852. .. rst-class:: classref-method
  853. |void| **set_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_custom_draw_callback>`
  854. Sets the given column's custom draw callback. Use an empty :ref:`Callable<class_Callable>` (``Callable()``) to clear the custom callback. The cell has to be in :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` to use this feature.
  855. The ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2<class_Rect2>`.
  856. .. rst-class:: classref-item-separator
  857. ----
  858. .. _class_TreeItem_method_set_custom_font:
  859. .. rst-class:: classref-method
  860. |void| **set_custom_font**\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_custom_font>`
  861. Sets custom font used to draw text in the given ``column``.
  862. .. rst-class:: classref-item-separator
  863. ----
  864. .. _class_TreeItem_method_set_custom_font_size:
  865. .. rst-class:: classref-method
  866. |void| **set_custom_font_size**\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_custom_font_size>`
  867. Sets custom font size used to draw text in the given ``column``.
  868. .. rst-class:: classref-item-separator
  869. ----
  870. .. _class_TreeItem_method_set_description:
  871. .. rst-class:: classref-method
  872. |void| **set_description**\ (\ column\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_description>`
  873. Sets the given column's description for assistive apps.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _class_TreeItem_method_set_edit_multiline:
  877. .. rst-class:: classref-method
  878. |void| **set_edit_multiline**\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_edit_multiline>`
  879. If ``multiline`` is ``true``, the given ``column`` is multiline editable.
  880. \ **Note:** This option only affects the type of control (:ref:`LineEdit<class_LineEdit>` or :ref:`TextEdit<class_TextEdit>`) that appears when editing the column. You can set multiline values with :ref:`set_text()<class_TreeItem_method_set_text>` even if the column is not multiline editable.
  881. .. rst-class:: classref-item-separator
  882. ----
  883. .. _class_TreeItem_method_set_editable:
  884. .. rst-class:: classref-method
  885. |void| **set_editable**\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_editable>`
  886. If ``enabled`` is ``true``, the given ``column`` is editable.
  887. .. rst-class:: classref-item-separator
  888. ----
  889. .. _class_TreeItem_method_set_expand_right:
  890. .. rst-class:: classref-method
  891. |void| **set_expand_right**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_expand_right>`
  892. If ``enable`` is ``true``, the given ``column`` is expanded to the right.
  893. .. rst-class:: classref-item-separator
  894. ----
  895. .. _class_TreeItem_method_set_icon:
  896. .. rst-class:: classref-method
  897. |void| **set_icon**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_icon>`
  898. Sets the given cell's icon :ref:`Texture2D<class_Texture2D>`. If the cell is in :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>` mode, the icon is displayed in the center of the cell. Otherwise, the icon is displayed before the cell's text. :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` does not display an icon.
  899. .. rst-class:: classref-item-separator
  900. ----
  901. .. _class_TreeItem_method_set_icon_max_width:
  902. .. rst-class:: classref-method
  903. |void| **set_icon_max_width**\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_icon_max_width>`
  904. Sets the maximum allowed width of the icon in the given ``column``. This limit is applied on top of the default size of the icon and on top of :ref:`Tree.icon_max_width<class_Tree_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio.
  905. .. rst-class:: classref-item-separator
  906. ----
  907. .. _class_TreeItem_method_set_icon_modulate:
  908. .. rst-class:: classref-method
  909. |void| **set_icon_modulate**\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_icon_modulate>`
  910. Modulates the given column's icon with ``modulate``.
  911. .. rst-class:: classref-item-separator
  912. ----
  913. .. _class_TreeItem_method_set_icon_overlay:
  914. .. rst-class:: classref-method
  915. |void| **set_icon_overlay**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_icon_overlay>`
  916. Sets the given cell's icon overlay :ref:`Texture2D<class_Texture2D>`. The cell has to be in :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>` mode, and icon has to be set. Overlay is drawn on top of icon, in the bottom left corner.
  917. .. rst-class:: classref-item-separator
  918. ----
  919. .. _class_TreeItem_method_set_icon_region:
  920. .. rst-class:: classref-method
  921. |void| **set_icon_region**\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_icon_region>`
  922. Sets the given column's icon's texture region.
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _class_TreeItem_method_set_indeterminate:
  926. .. rst-class:: classref-method
  927. |void| **set_indeterminate**\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_indeterminate>`
  928. If ``indeterminate`` is ``true``, the given ``column`` is marked indeterminate.
  929. \ **Note:** If set ``true`` from ``false``, then column is cleared of checked status.
  930. .. rst-class:: classref-item-separator
  931. ----
  932. .. _class_TreeItem_method_set_language:
  933. .. rst-class:: classref-method
  934. |void| **set_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_language>`
  935. Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_TreeItem_method_set_metadata:
  939. .. rst-class:: classref-method
  940. |void| **set_metadata**\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_metadata>`
  941. Sets the metadata value for the given column, which can be retrieved later using :ref:`get_metadata()<class_TreeItem_method_get_metadata>`. This can be used, for example, to store a reference to the original data.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_TreeItem_method_set_range:
  945. .. rst-class:: classref-method
  946. |void| **set_range**\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_range>`
  947. Sets the value of a :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` column.
  948. .. rst-class:: classref-item-separator
  949. ----
  950. .. _class_TreeItem_method_set_range_config:
  951. .. rst-class:: classref-method
  952. |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>`
  953. Sets the range of accepted values for a column. The column must be in the :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` mode.
  954. If ``expr`` is ``true``, the edit mode slider will use an exponential scale as with :ref:`Range.exp_edit<class_Range_property_exp_edit>`.
  955. .. rst-class:: classref-item-separator
  956. ----
  957. .. _class_TreeItem_method_set_selectable:
  958. .. rst-class:: classref-method
  959. |void| **set_selectable**\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_selectable>`
  960. If ``selectable`` is ``true``, the given ``column`` is selectable.
  961. .. rst-class:: classref-item-separator
  962. ----
  963. .. _class_TreeItem_method_set_structured_text_bidi_override:
  964. .. rst-class:: classref-method
  965. |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>`
  966. Set BiDi algorithm override for the structured text. Has effect for cells that display text.
  967. .. rst-class:: classref-item-separator
  968. ----
  969. .. _class_TreeItem_method_set_structured_text_bidi_override_options:
  970. .. rst-class:: classref-method
  971. |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>`
  972. Set additional options for BiDi override. Has effect for cells that display text.
  973. .. rst-class:: classref-item-separator
  974. ----
  975. .. _class_TreeItem_method_set_suffix:
  976. .. rst-class:: classref-method
  977. |void| **set_suffix**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_suffix>`
  978. Sets a string to be shown after a column's value (for example, a unit abbreviation).
  979. .. rst-class:: classref-item-separator
  980. ----
  981. .. _class_TreeItem_method_set_text:
  982. .. rst-class:: classref-method
  983. |void| **set_text**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_text>`
  984. Sets the given column's text value.
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _class_TreeItem_method_set_text_alignment:
  988. .. rst-class:: classref-method
  989. |void| **set_text_alignment**\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_text_alignment>`
  990. Sets the given column's text alignment to ``text_alignment``.
  991. .. rst-class:: classref-item-separator
  992. ----
  993. .. _class_TreeItem_method_set_text_direction:
  994. .. rst-class:: classref-method
  995. |void| **set_text_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_text_direction>`
  996. Sets item's text base writing direction.
  997. .. rst-class:: classref-item-separator
  998. ----
  999. .. _class_TreeItem_method_set_text_overrun_behavior:
  1000. .. rst-class:: classref-method
  1001. |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>`
  1002. Sets the clipping behavior when the text exceeds the item's bounding rectangle in the given ``column``.
  1003. .. rst-class:: classref-item-separator
  1004. ----
  1005. .. _class_TreeItem_method_set_tooltip_text:
  1006. .. rst-class:: classref-method
  1007. |void| **set_tooltip_text**\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TreeItem_method_set_tooltip_text>`
  1008. Sets the given column's tooltip text.
  1009. .. rst-class:: classref-item-separator
  1010. ----
  1011. .. _class_TreeItem_method_uncollapse_tree:
  1012. .. rst-class:: classref-method
  1013. |void| **uncollapse_tree**\ (\ ) :ref:`๐Ÿ”—<class_TreeItem_method_uncollapse_tree>`
  1014. Uncollapses all **TreeItem**\ s necessary to reveal this **TreeItem**, i.e. all ancestor **TreeItem**\ s.
  1015. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1016. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  1017. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1018. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1019. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1020. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1021. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1022. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1023. .. |void| replace:: :abbr:`void (No return value.)`