class_treeitem.rst 121 KB

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