class_treeitem.rst 116 KB

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