class_treeitem.rst 120 KB

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