class_itemlist.rst 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458
  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/ItemList.xml.
  6. .. _class_ItemList:
  7. ItemList
  8. ========
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A vertical list of selectable items with one or multiple columns.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This control provides a vertical list of selectable items that may be in a single or in multiple columns, with each item having options for text and an icon. Tooltips are supported and may be different for every item in the list.
  15. Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing :kbd:`Enter`.
  16. Item text only supports single-line strings. Newline characters (e.g. ``\n``) in the string won't produce a newline. Text wrapping is enabled in :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>` mode, but the column's width is adjusted to fully fit its content by default. You need to set :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` greater than zero to wrap the text.
  17. All ``set_*`` methods allow negative item indices, i.e. ``-1`` to access the last item, ``-2`` to select the second-to-last item, and so on.
  18. \ **Incremental search:** Like :ref:`PopupMenu<class_PopupMenu>` and :ref:`Tree<class_Tree>`, **ItemList** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec<class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec>`.
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`allow_reselect<class_ItemList_property_allow_reselect>` | ``false`` |
  26. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`allow_rmb_select<class_ItemList_property_allow_rmb_select>` | ``false`` |
  28. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`allow_search<class_ItemList_property_allow_search>` | ``true`` |
  30. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`auto_height<class_ItemList_property_auto_height>` | ``false`` |
  32. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`auto_width<class_ItemList_property_auto_width>` | ``false`` |
  34. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
  36. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` | ``0`` |
  38. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  39. | :ref:`Vector2i<class_Vector2i>` | :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` | ``Vector2i(0, 0)`` |
  40. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  41. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  42. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  43. | :ref:`IconMode<enum_ItemList_IconMode>` | :ref:`icon_mode<class_ItemList_property_icon_mode>` | ``1`` |
  44. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  45. | :ref:`float<class_float>` | :ref:`icon_scale<class_ItemList_property_icon_scale>` | ``1.0`` |
  46. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`item_count<class_ItemList_property_item_count>` | ``0`` |
  48. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  49. | :ref:`int<class_int>` | :ref:`max_columns<class_ItemList_property_max_columns>` | ``1`` |
  50. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`max_text_lines<class_ItemList_property_max_text_lines>` | ``1`` |
  52. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`same_column_width<class_ItemList_property_same_column_width>` | ``false`` |
  54. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  55. | :ref:`SelectMode<enum_ItemList_SelectMode>` | :ref:`select_mode<class_ItemList_property_select_mode>` | ``0`` |
  56. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  57. | :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`text_overrun_behavior<class_ItemList_property_text_overrun_behavior>` | ``3`` |
  58. +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
  59. .. rst-class:: classref-reftable-group
  60. Methods
  61. -------
  62. .. table::
  63. :widths: auto
  64. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`add_icon_item<class_ItemList_method_add_icon_item>`\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) |
  66. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`int<class_int>` | :ref:`add_item<class_ItemList_method_add_item>`\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) |
  68. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | |void| | :ref:`clear<class_ItemList_method_clear>`\ (\ ) |
  70. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | |void| | :ref:`deselect<class_ItemList_method_deselect>`\ (\ idx\: :ref:`int<class_int>`\ ) |
  72. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | |void| | :ref:`deselect_all<class_ItemList_method_deselect_all>`\ (\ ) |
  74. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | |void| | :ref:`ensure_current_is_visible<class_ItemList_method_ensure_current_is_visible>`\ (\ ) |
  76. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | |void| | :ref:`force_update_list_size<class_ItemList_method_force_update_list_size>`\ (\ ) |
  78. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`int<class_int>` | :ref:`get_item_at_position<class_ItemList_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| |
  80. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`get_item_auto_translate_mode<class_ItemList_method_get_item_auto_translate_mode>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  82. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`Color<class_Color>` | :ref:`get_item_custom_bg_color<class_ItemList_method_get_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  84. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`Color<class_Color>` | :ref:`get_item_custom_fg_color<class_ItemList_method_get_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  86. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_ItemList_method_get_item_icon>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  88. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_ItemList_method_get_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  90. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`Rect2<class_Rect2>` | :ref:`get_item_icon_region<class_ItemList_method_get_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  92. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`String<class_String>` | :ref:`get_item_language<class_ItemList_method_get_item_language>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  94. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_ItemList_method_get_item_metadata>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  96. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_ItemList_method_get_item_rect>`\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| |
  98. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`String<class_String>` | :ref:`get_item_text<class_ItemList_method_get_item_text>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  100. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_ItemList_method_get_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  102. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_ItemList_method_get_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  104. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_selected_items<class_ItemList_method_get_selected_items>`\ (\ ) |
  106. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ItemList_method_get_v_scroll_bar>`\ (\ ) |
  108. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`bool<class_bool>` | :ref:`is_anything_selected<class_ItemList_method_is_anything_selected>`\ (\ ) |
  110. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_ItemList_method_is_item_disabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  112. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`bool<class_bool>` | :ref:`is_item_icon_transposed<class_ItemList_method_is_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  114. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`bool<class_bool>` | :ref:`is_item_selectable<class_ItemList_method_is_item_selectable>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  116. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`bool<class_bool>` | :ref:`is_item_tooltip_enabled<class_ItemList_method_is_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  118. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`bool<class_bool>` | :ref:`is_selected<class_ItemList_method_is_selected>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  120. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | |void| | :ref:`move_item<class_ItemList_method_move_item>`\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) |
  122. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | |void| | :ref:`remove_item<class_ItemList_method_remove_item>`\ (\ idx\: :ref:`int<class_int>`\ ) |
  124. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | |void| | :ref:`select<class_ItemList_method_select>`\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) |
  126. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | |void| | :ref:`set_item_auto_translate_mode<class_ItemList_method_set_item_auto_translate_mode>`\ (\ idx\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) |
  128. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | |void| | :ref:`set_item_custom_bg_color<class_ItemList_method_set_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) |
  130. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | |void| | :ref:`set_item_custom_fg_color<class_ItemList_method_set_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) |
  132. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | |void| | :ref:`set_item_disabled<class_ItemList_method_set_item_disabled>`\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  134. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | |void| | :ref:`set_item_icon<class_ItemList_method_set_item_icon>`\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  136. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | |void| | :ref:`set_item_icon_modulate<class_ItemList_method_set_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) |
  138. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | |void| | :ref:`set_item_icon_region<class_ItemList_method_set_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |
  140. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | |void| | :ref:`set_item_icon_transposed<class_ItemList_method_set_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) |
  142. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | |void| | :ref:`set_item_language<class_ItemList_method_set_item_language>`\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
  144. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | |void| | :ref:`set_item_metadata<class_ItemList_method_set_item_metadata>`\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) |
  146. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | |void| | :ref:`set_item_selectable<class_ItemList_method_set_item_selectable>`\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) |
  148. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | |void| | :ref:`set_item_text<class_ItemList_method_set_item_text>`\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
  150. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | |void| | :ref:`set_item_text_direction<class_ItemList_method_set_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
  152. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | |void| | :ref:`set_item_tooltip<class_ItemList_method_set_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  154. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | |void| | :ref:`set_item_tooltip_enabled<class_ItemList_method_set_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
  156. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | |void| | :ref:`sort_items_by_text<class_ItemList_method_sort_items_by_text>`\ (\ ) |
  158. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. .. rst-class:: classref-reftable-group
  160. Theme Properties
  161. ----------------
  162. .. table::
  163. :widths: auto
  164. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  165. | :ref:`Color<class_Color>` | :ref:`font_color<class_ItemList_theme_color_font_color>` | ``Color(0.65, 0.65, 0.65, 1)`` |
  166. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  167. | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_ItemList_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  168. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  169. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ItemList_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  170. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  171. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_ItemList_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
  172. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  173. | :ref:`Color<class_Color>` | :ref:`guide_color<class_ItemList_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` |
  174. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  175. | :ref:`int<class_int>` | :ref:`h_separation<class_ItemList_theme_constant_h_separation>` | ``4`` |
  176. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  177. | :ref:`int<class_int>` | :ref:`icon_margin<class_ItemList_theme_constant_icon_margin>` | ``4`` |
  178. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  179. | :ref:`int<class_int>` | :ref:`line_separation<class_ItemList_theme_constant_line_separation>` | ``2`` |
  180. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  181. | :ref:`int<class_int>` | :ref:`outline_size<class_ItemList_theme_constant_outline_size>` | ``0`` |
  182. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  183. | :ref:`int<class_int>` | :ref:`v_separation<class_ItemList_theme_constant_v_separation>` | ``4`` |
  184. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  185. | :ref:`Font<class_Font>` | :ref:`font<class_ItemList_theme_font_font>` | |
  186. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  187. | :ref:`int<class_int>` | :ref:`font_size<class_ItemList_theme_font_size_font_size>` | |
  188. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  189. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_ItemList_theme_style_cursor>` | |
  190. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  191. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_ItemList_theme_style_cursor_unfocused>` | |
  192. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  193. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_ItemList_theme_style_focus>` | |
  194. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  195. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered<class_ItemList_theme_style_hovered>` | |
  196. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  197. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_ItemList_theme_style_panel>` | |
  198. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  199. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_ItemList_theme_style_selected>` | |
  200. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  201. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_ItemList_theme_style_selected_focus>` | |
  202. +---------------------------------+----------------------------------------------------------------------------+--------------------------------+
  203. .. rst-class:: classref-section-separator
  204. ----
  205. .. rst-class:: classref-descriptions-group
  206. Signals
  207. -------
  208. .. _class_ItemList_signal_empty_clicked:
  209. .. rst-class:: classref-signal
  210. **empty_clicked**\ (\ at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_signal_empty_clicked>`
  211. Emitted when any mouse click is issued within the rect of the list but on empty space.
  212. \ ``at_position`` is the click position in this control's local coordinate system.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_ItemList_signal_item_activated:
  216. .. rst-class:: classref-signal
  217. **item_activated**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_signal_item_activated>`
  218. Emitted when specified list item is activated via double-clicking or by pressing :kbd:`Enter`.
  219. .. rst-class:: classref-item-separator
  220. ----
  221. .. _class_ItemList_signal_item_clicked:
  222. .. rst-class:: classref-signal
  223. **item_clicked**\ (\ index\: :ref:`int<class_int>`, at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_signal_item_clicked>`
  224. Emitted when specified list item has been clicked with any mouse button.
  225. \ ``at_position`` is the click position in this control's local coordinate system.
  226. .. rst-class:: classref-item-separator
  227. ----
  228. .. _class_ItemList_signal_item_selected:
  229. .. rst-class:: classref-signal
  230. **item_selected**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_signal_item_selected>`
  231. Emitted when specified item has been selected. Only applicable in single selection mode.
  232. \ :ref:`allow_reselect<class_ItemList_property_allow_reselect>` must be enabled to reselect an item.
  233. .. rst-class:: classref-item-separator
  234. ----
  235. .. _class_ItemList_signal_multi_selected:
  236. .. rst-class:: classref-signal
  237. **multi_selected**\ (\ index\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_ItemList_signal_multi_selected>`
  238. Emitted when a multiple selection is altered on a list allowing multiple selection.
  239. .. rst-class:: classref-section-separator
  240. ----
  241. .. rst-class:: classref-descriptions-group
  242. Enumerations
  243. ------------
  244. .. _enum_ItemList_IconMode:
  245. .. rst-class:: classref-enumeration
  246. enum **IconMode**: :ref:`๐Ÿ”—<enum_ItemList_IconMode>`
  247. .. _class_ItemList_constant_ICON_MODE_TOP:
  248. .. rst-class:: classref-enumeration-constant
  249. :ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_TOP** = ``0``
  250. Icon is drawn above the text.
  251. .. _class_ItemList_constant_ICON_MODE_LEFT:
  252. .. rst-class:: classref-enumeration-constant
  253. :ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_LEFT** = ``1``
  254. Icon is drawn to the left of the text.
  255. .. rst-class:: classref-item-separator
  256. ----
  257. .. _enum_ItemList_SelectMode:
  258. .. rst-class:: classref-enumeration
  259. enum **SelectMode**: :ref:`๐Ÿ”—<enum_ItemList_SelectMode>`
  260. .. _class_ItemList_constant_SELECT_SINGLE:
  261. .. rst-class:: classref-enumeration-constant
  262. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_SINGLE** = ``0``
  263. Only allow selecting a single item.
  264. .. _class_ItemList_constant_SELECT_MULTI:
  265. .. rst-class:: classref-enumeration-constant
  266. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_MULTI** = ``1``
  267. Allows selecting multiple items by holding :kbd:`Ctrl` or :kbd:`Shift`.
  268. .. rst-class:: classref-section-separator
  269. ----
  270. .. rst-class:: classref-descriptions-group
  271. Property Descriptions
  272. ---------------------
  273. .. _class_ItemList_property_allow_reselect:
  274. .. rst-class:: classref-property
  275. :ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`๐Ÿ”—<class_ItemList_property_allow_reselect>`
  276. .. rst-class:: classref-property-setget
  277. - |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ )
  278. - :ref:`bool<class_bool>` **get_allow_reselect**\ (\ )
  279. If ``true``, the currently selected item can be selected again.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _class_ItemList_property_allow_rmb_select:
  283. .. rst-class:: classref-property
  284. :ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`๐Ÿ”—<class_ItemList_property_allow_rmb_select>`
  285. .. rst-class:: classref-property-setget
  286. - |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ )
  287. - :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ )
  288. If ``true``, right mouse button click can select items.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_ItemList_property_allow_search:
  292. .. rst-class:: classref-property
  293. :ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`๐Ÿ”—<class_ItemList_property_allow_search>`
  294. .. rst-class:: classref-property-setget
  295. - |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ )
  296. - :ref:`bool<class_bool>` **get_allow_search**\ (\ )
  297. If ``true``, allows navigating the **ItemList** with letter keys through incremental search.
  298. .. rst-class:: classref-item-separator
  299. ----
  300. .. _class_ItemList_property_auto_height:
  301. .. rst-class:: classref-property
  302. :ref:`bool<class_bool>` **auto_height** = ``false`` :ref:`๐Ÿ”—<class_ItemList_property_auto_height>`
  303. .. rst-class:: classref-property-setget
  304. - |void| **set_auto_height**\ (\ value\: :ref:`bool<class_bool>`\ )
  305. - :ref:`bool<class_bool>` **has_auto_height**\ (\ )
  306. If ``true``, the control will automatically resize the height to fit its content.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_ItemList_property_auto_width:
  310. .. rst-class:: classref-property
  311. :ref:`bool<class_bool>` **auto_width** = ``false`` :ref:`๐Ÿ”—<class_ItemList_property_auto_width>`
  312. .. rst-class:: classref-property-setget
  313. - |void| **set_auto_width**\ (\ value\: :ref:`bool<class_bool>`\ )
  314. - :ref:`bool<class_bool>` **has_auto_width**\ (\ )
  315. If ``true``, the control will automatically resize the width to fit its content.
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_ItemList_property_fixed_column_width:
  319. .. rst-class:: classref-property
  320. :ref:`int<class_int>` **fixed_column_width** = ``0`` :ref:`๐Ÿ”—<class_ItemList_property_fixed_column_width>`
  321. .. rst-class:: classref-property-setget
  322. - |void| **set_fixed_column_width**\ (\ value\: :ref:`int<class_int>`\ )
  323. - :ref:`int<class_int>` **get_fixed_column_width**\ (\ )
  324. The width all columns will be adjusted to.
  325. A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width.
  326. .. rst-class:: classref-item-separator
  327. ----
  328. .. _class_ItemList_property_fixed_icon_size:
  329. .. rst-class:: classref-property
  330. :ref:`Vector2i<class_Vector2i>` **fixed_icon_size** = ``Vector2i(0, 0)`` :ref:`๐Ÿ”—<class_ItemList_property_fixed_icon_size>`
  331. .. rst-class:: classref-property-setget
  332. - |void| **set_fixed_icon_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  333. - :ref:`Vector2i<class_Vector2i>` **get_fixed_icon_size**\ (\ )
  334. The size all icons will be adjusted to.
  335. If either X or Y component is not greater than zero, icon size won't be affected.
  336. .. rst-class:: classref-item-separator
  337. ----
  338. .. _class_ItemList_property_icon_mode:
  339. .. rst-class:: classref-property
  340. :ref:`IconMode<enum_ItemList_IconMode>` **icon_mode** = ``1`` :ref:`๐Ÿ”—<class_ItemList_property_icon_mode>`
  341. .. rst-class:: classref-property-setget
  342. - |void| **set_icon_mode**\ (\ value\: :ref:`IconMode<enum_ItemList_IconMode>`\ )
  343. - :ref:`IconMode<enum_ItemList_IconMode>` **get_icon_mode**\ (\ )
  344. The icon position, whether above or to the left of the text. See the :ref:`IconMode<enum_ItemList_IconMode>` constants.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_ItemList_property_icon_scale:
  348. .. rst-class:: classref-property
  349. :ref:`float<class_float>` **icon_scale** = ``1.0`` :ref:`๐Ÿ”—<class_ItemList_property_icon_scale>`
  350. .. rst-class:: classref-property-setget
  351. - |void| **set_icon_scale**\ (\ value\: :ref:`float<class_float>`\ )
  352. - :ref:`float<class_float>` **get_icon_scale**\ (\ )
  353. The scale of icon applied after :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` and transposing takes effect.
  354. .. rst-class:: classref-item-separator
  355. ----
  356. .. _class_ItemList_property_item_count:
  357. .. rst-class:: classref-property
  358. :ref:`int<class_int>` **item_count** = ``0`` :ref:`๐Ÿ”—<class_ItemList_property_item_count>`
  359. .. rst-class:: classref-property-setget
  360. - |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ )
  361. - :ref:`int<class_int>` **get_item_count**\ (\ )
  362. The number of items currently in the list.
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _class_ItemList_property_max_columns:
  366. .. rst-class:: classref-property
  367. :ref:`int<class_int>` **max_columns** = ``1`` :ref:`๐Ÿ”—<class_ItemList_property_max_columns>`
  368. .. rst-class:: classref-property-setget
  369. - |void| **set_max_columns**\ (\ value\: :ref:`int<class_int>`\ )
  370. - :ref:`int<class_int>` **get_max_columns**\ (\ )
  371. Maximum columns the list will have.
  372. If greater than zero, the content will be split among the specified columns.
  373. A value of zero means unlimited columns, i.e. all items will be put in the same row.
  374. .. rst-class:: classref-item-separator
  375. ----
  376. .. _class_ItemList_property_max_text_lines:
  377. .. rst-class:: classref-property
  378. :ref:`int<class_int>` **max_text_lines** = ``1`` :ref:`๐Ÿ”—<class_ItemList_property_max_text_lines>`
  379. .. rst-class:: classref-property-setget
  380. - |void| **set_max_text_lines**\ (\ value\: :ref:`int<class_int>`\ )
  381. - :ref:`int<class_int>` **get_max_text_lines**\ (\ )
  382. Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.
  383. \ **Note:** This property takes effect only when :ref:`icon_mode<class_ItemList_property_icon_mode>` is :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>`. To make the text wrap, :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` should be greater than zero.
  384. .. rst-class:: classref-item-separator
  385. ----
  386. .. _class_ItemList_property_same_column_width:
  387. .. rst-class:: classref-property
  388. :ref:`bool<class_bool>` **same_column_width** = ``false`` :ref:`๐Ÿ”—<class_ItemList_property_same_column_width>`
  389. .. rst-class:: classref-property-setget
  390. - |void| **set_same_column_width**\ (\ value\: :ref:`bool<class_bool>`\ )
  391. - :ref:`bool<class_bool>` **is_same_column_width**\ (\ )
  392. Whether all columns will have the same width.
  393. If ``true``, the width is equal to the largest column width of all columns.
  394. .. rst-class:: classref-item-separator
  395. ----
  396. .. _class_ItemList_property_select_mode:
  397. .. rst-class:: classref-property
  398. :ref:`SelectMode<enum_ItemList_SelectMode>` **select_mode** = ``0`` :ref:`๐Ÿ”—<class_ItemList_property_select_mode>`
  399. .. rst-class:: classref-property-setget
  400. - |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_ItemList_SelectMode>`\ )
  401. - :ref:`SelectMode<enum_ItemList_SelectMode>` **get_select_mode**\ (\ )
  402. Allows single or multiple item selection. See the :ref:`SelectMode<enum_ItemList_SelectMode>` constants.
  403. .. rst-class:: classref-item-separator
  404. ----
  405. .. _class_ItemList_property_text_overrun_behavior:
  406. .. rst-class:: classref-property
  407. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` :ref:`๐Ÿ”—<class_ItemList_property_text_overrun_behavior>`
  408. .. rst-class:: classref-property-setget
  409. - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ )
  410. - :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ )
  411. Sets the clipping behavior when the text exceeds an item's bounding rectangle. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes.
  412. .. rst-class:: classref-section-separator
  413. ----
  414. .. rst-class:: classref-descriptions-group
  415. Method Descriptions
  416. -------------------
  417. .. _class_ItemList_method_add_icon_item:
  418. .. rst-class:: classref-method
  419. :ref:`int<class_int>` **add_icon_item**\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`๐Ÿ”—<class_ItemList_method_add_icon_item>`
  420. Adds an item to the item list with no text, only an icon. Returns the index of an added item.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_ItemList_method_add_item:
  424. .. rst-class:: classref-method
  425. :ref:`int<class_int>` **add_item**\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`๐Ÿ”—<class_ItemList_method_add_item>`
  426. Adds an item to the item list with specified text. Returns the index of an added item.
  427. Specify an ``icon``, or use ``null`` as the ``icon`` for a list item with no icon.
  428. If ``selectable`` is ``true``, the list item will be selectable.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_ItemList_method_clear:
  432. .. rst-class:: classref-method
  433. |void| **clear**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_clear>`
  434. Removes all items from the list.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_ItemList_method_deselect:
  438. .. rst-class:: classref-method
  439. |void| **deselect**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_deselect>`
  440. Ensures the item associated with the specified index is not selected.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_ItemList_method_deselect_all:
  444. .. rst-class:: classref-method
  445. |void| **deselect_all**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_deselect_all>`
  446. Ensures there are no items selected.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_ItemList_method_ensure_current_is_visible:
  450. .. rst-class:: classref-method
  451. |void| **ensure_current_is_visible**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_ensure_current_is_visible>`
  452. Ensure current selection is visible, adjusting the scroll position as necessary.
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_ItemList_method_force_update_list_size:
  456. .. rst-class:: classref-method
  457. |void| **force_update_list_size**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_force_update_list_size>`
  458. Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like :ref:`auto_height<class_ItemList_property_auto_height>`, change. The method can be used to trigger the update ahead of next drawing pass.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_ItemList_method_get_item_at_position:
  462. .. rst-class:: classref-method
  463. :ref:`int<class_int>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_at_position>`
  464. Returns the item index at the given ``position``.
  465. When there is no item at that point, -1 will be returned if ``exact`` is ``true``, and the closest item index will be returned otherwise.
  466. \ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame.
  467. .. rst-class:: classref-item-separator
  468. ----
  469. .. _class_ItemList_method_get_item_auto_translate_mode:
  470. .. rst-class:: classref-method
  471. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_item_auto_translate_mode**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_auto_translate_mode>`
  472. Returns item's auto translate mode.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _class_ItemList_method_get_item_custom_bg_color:
  476. .. rst-class:: classref-method
  477. :ref:`Color<class_Color>` **get_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_custom_bg_color>`
  478. Returns the custom background color of the item specified by ``idx`` index.
  479. .. rst-class:: classref-item-separator
  480. ----
  481. .. _class_ItemList_method_get_item_custom_fg_color:
  482. .. rst-class:: classref-method
  483. :ref:`Color<class_Color>` **get_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_custom_fg_color>`
  484. Returns the custom foreground color of the item specified by ``idx`` index.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_ItemList_method_get_item_icon:
  488. .. rst-class:: classref-method
  489. :ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_icon>`
  490. Returns the icon associated with the specified index.
  491. .. rst-class:: classref-item-separator
  492. ----
  493. .. _class_ItemList_method_get_item_icon_modulate:
  494. .. rst-class:: classref-method
  495. :ref:`Color<class_Color>` **get_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_icon_modulate>`
  496. Returns a :ref:`Color<class_Color>` modulating item's icon at the specified index.
  497. .. rst-class:: classref-item-separator
  498. ----
  499. .. _class_ItemList_method_get_item_icon_region:
  500. .. rst-class:: classref-method
  501. :ref:`Rect2<class_Rect2>` **get_item_icon_region**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_icon_region>`
  502. Returns the region of item's icon used. The whole icon will be used if the region has no area.
  503. .. rst-class:: classref-item-separator
  504. ----
  505. .. _class_ItemList_method_get_item_language:
  506. .. rst-class:: classref-method
  507. :ref:`String<class_String>` **get_item_language**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_language>`
  508. Returns item's text language code.
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _class_ItemList_method_get_item_metadata:
  512. .. rst-class:: classref-method
  513. :ref:`Variant<class_Variant>` **get_item_metadata**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_metadata>`
  514. Returns the metadata value of the specified index.
  515. .. rst-class:: classref-item-separator
  516. ----
  517. .. _class_ItemList_method_get_item_rect:
  518. .. rst-class:: classref-method
  519. :ref:`Rect2<class_Rect2>` **get_item_rect**\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_rect>`
  520. Returns the position and size of the item with the specified index, in the coordinate system of the **ItemList** node. If ``expand`` is ``true`` the last column expands to fill the rest of the row.
  521. \ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _class_ItemList_method_get_item_text:
  525. .. rst-class:: classref-method
  526. :ref:`String<class_String>` **get_item_text**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_text>`
  527. Returns the text associated with the specified index.
  528. .. rst-class:: classref-item-separator
  529. ----
  530. .. _class_ItemList_method_get_item_text_direction:
  531. .. rst-class:: classref-method
  532. :ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_text_direction>`
  533. Returns item's text base writing direction.
  534. .. rst-class:: classref-item-separator
  535. ----
  536. .. _class_ItemList_method_get_item_tooltip:
  537. .. rst-class:: classref-method
  538. :ref:`String<class_String>` **get_item_tooltip**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_get_item_tooltip>`
  539. Returns the tooltip hint associated with the specified index.
  540. .. rst-class:: classref-item-separator
  541. ----
  542. .. _class_ItemList_method_get_selected_items:
  543. .. rst-class:: classref-method
  544. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_selected_items**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_get_selected_items>`
  545. Returns an array with the indexes of the selected items.
  546. .. rst-class:: classref-item-separator
  547. ----
  548. .. _class_ItemList_method_get_v_scroll_bar:
  549. .. rst-class:: classref-method
  550. :ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_get_v_scroll_bar>`
  551. Returns the vertical scrollbar.
  552. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  553. .. rst-class:: classref-item-separator
  554. ----
  555. .. _class_ItemList_method_is_anything_selected:
  556. .. rst-class:: classref-method
  557. :ref:`bool<class_bool>` **is_anything_selected**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_is_anything_selected>`
  558. Returns ``true`` if one or more items are selected.
  559. .. rst-class:: classref-item-separator
  560. ----
  561. .. _class_ItemList_method_is_item_disabled:
  562. .. rst-class:: classref-method
  563. :ref:`bool<class_bool>` **is_item_disabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_is_item_disabled>`
  564. Returns ``true`` if the item at the specified index is disabled.
  565. .. rst-class:: classref-item-separator
  566. ----
  567. .. _class_ItemList_method_is_item_icon_transposed:
  568. .. rst-class:: classref-method
  569. :ref:`bool<class_bool>` **is_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_is_item_icon_transposed>`
  570. Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped.
  571. .. rst-class:: classref-item-separator
  572. ----
  573. .. _class_ItemList_method_is_item_selectable:
  574. .. rst-class:: classref-method
  575. :ref:`bool<class_bool>` **is_item_selectable**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_is_item_selectable>`
  576. Returns ``true`` if the item at the specified index is selectable.
  577. .. rst-class:: classref-item-separator
  578. ----
  579. .. _class_ItemList_method_is_item_tooltip_enabled:
  580. .. rst-class:: classref-method
  581. :ref:`bool<class_bool>` **is_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_is_item_tooltip_enabled>`
  582. Returns ``true`` if the tooltip is enabled for specified item index.
  583. .. rst-class:: classref-item-separator
  584. ----
  585. .. _class_ItemList_method_is_selected:
  586. .. rst-class:: classref-method
  587. :ref:`bool<class_bool>` **is_selected**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_ItemList_method_is_selected>`
  588. Returns ``true`` if the item at the specified index is currently selected.
  589. .. rst-class:: classref-item-separator
  590. ----
  591. .. _class_ItemList_method_move_item:
  592. .. rst-class:: classref-method
  593. |void| **move_item**\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_move_item>`
  594. Moves item from index ``from_idx`` to ``to_idx``.
  595. .. rst-class:: classref-item-separator
  596. ----
  597. .. _class_ItemList_method_remove_item:
  598. .. rst-class:: classref-method
  599. |void| **remove_item**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_remove_item>`
  600. Removes the item specified by ``idx`` index from the list.
  601. .. rst-class:: classref-item-separator
  602. ----
  603. .. _class_ItemList_method_select:
  604. .. rst-class:: classref-method
  605. |void| **select**\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) :ref:`๐Ÿ”—<class_ItemList_method_select>`
  606. Select the item at the specified index.
  607. \ **Note:** This method does not trigger the item selection signal.
  608. .. rst-class:: classref-item-separator
  609. ----
  610. .. _class_ItemList_method_set_item_auto_translate_mode:
  611. .. rst-class:: classref-method
  612. |void| **set_item_auto_translate_mode**\ (\ idx\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_auto_translate_mode>`
  613. Sets the auto translate mode of the item associated with the specified index.
  614. Items 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 **ItemList** itself.
  615. .. rst-class:: classref-item-separator
  616. ----
  617. .. _class_ItemList_method_set_item_custom_bg_color:
  618. .. rst-class:: classref-method
  619. |void| **set_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_custom_bg_color>`
  620. Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`.
  621. .. rst-class:: classref-item-separator
  622. ----
  623. .. _class_ItemList_method_set_item_custom_fg_color:
  624. .. rst-class:: classref-method
  625. |void| **set_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_custom_fg_color>`
  626. Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`.
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_ItemList_method_set_item_disabled:
  630. .. rst-class:: classref-method
  631. |void| **set_item_disabled**\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_disabled>`
  632. Disables (or enables) the item at the specified index.
  633. Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing :kbd:`Enter`).
  634. .. rst-class:: classref-item-separator
  635. ----
  636. .. _class_ItemList_method_set_item_icon:
  637. .. rst-class:: classref-method
  638. |void| **set_item_icon**\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_icon>`
  639. Sets (or replaces) the icon's :ref:`Texture2D<class_Texture2D>` associated with the specified index.
  640. .. rst-class:: classref-item-separator
  641. ----
  642. .. _class_ItemList_method_set_item_icon_modulate:
  643. .. rst-class:: classref-method
  644. |void| **set_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_icon_modulate>`
  645. Sets a modulating :ref:`Color<class_Color>` of the item associated with the specified index.
  646. .. rst-class:: classref-item-separator
  647. ----
  648. .. _class_ItemList_method_set_item_icon_region:
  649. .. rst-class:: classref-method
  650. |void| **set_item_icon_region**\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_icon_region>`
  651. Sets the region of item's icon used. The whole icon will be used if the region has no area.
  652. .. rst-class:: classref-item-separator
  653. ----
  654. .. _class_ItemList_method_set_item_icon_transposed:
  655. .. rst-class:: classref-method
  656. |void| **set_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_icon_transposed>`
  657. Sets whether the item icon will be drawn transposed.
  658. .. rst-class:: classref-item-separator
  659. ----
  660. .. _class_ItemList_method_set_item_language:
  661. .. rst-class:: classref-method
  662. |void| **set_item_language**\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_language>`
  663. Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  664. .. rst-class:: classref-item-separator
  665. ----
  666. .. _class_ItemList_method_set_item_metadata:
  667. .. rst-class:: classref-method
  668. |void| **set_item_metadata**\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_metadata>`
  669. Sets a value (of any type) to be stored with the item associated with the specified index.
  670. .. rst-class:: classref-item-separator
  671. ----
  672. .. _class_ItemList_method_set_item_selectable:
  673. .. rst-class:: classref-method
  674. |void| **set_item_selectable**\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_selectable>`
  675. Allows or disallows selection of the item associated with the specified index.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_ItemList_method_set_item_text:
  679. .. rst-class:: classref-method
  680. |void| **set_item_text**\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_text>`
  681. Sets text of the item associated with the specified index.
  682. .. rst-class:: classref-item-separator
  683. ----
  684. .. _class_ItemList_method_set_item_text_direction:
  685. .. rst-class:: classref-method
  686. |void| **set_item_text_direction**\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_text_direction>`
  687. Sets item's text base writing direction.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_ItemList_method_set_item_tooltip:
  691. .. rst-class:: classref-method
  692. |void| **set_item_tooltip**\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_tooltip>`
  693. Sets the tooltip hint for the item associated with the specified index.
  694. .. rst-class:: classref-item-separator
  695. ----
  696. .. _class_ItemList_method_set_item_tooltip_enabled:
  697. .. rst-class:: classref-method
  698. |void| **set_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_ItemList_method_set_item_tooltip_enabled>`
  699. Sets whether the tooltip hint is enabled for specified item index.
  700. .. rst-class:: classref-item-separator
  701. ----
  702. .. _class_ItemList_method_sort_items_by_text:
  703. .. rst-class:: classref-method
  704. |void| **sort_items_by_text**\ (\ ) :ref:`๐Ÿ”—<class_ItemList_method_sort_items_by_text>`
  705. Sorts items in the list by their text.
  706. .. rst-class:: classref-section-separator
  707. ----
  708. .. rst-class:: classref-descriptions-group
  709. Theme Property Descriptions
  710. ---------------------------
  711. .. _class_ItemList_theme_color_font_color:
  712. .. rst-class:: classref-themeproperty
  713. :ref:`Color<class_Color>` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` :ref:`๐Ÿ”—<class_ItemList_theme_color_font_color>`
  714. Default text :ref:`Color<class_Color>` of the item.
  715. .. rst-class:: classref-item-separator
  716. ----
  717. .. _class_ItemList_theme_color_font_hovered_color:
  718. .. rst-class:: classref-themeproperty
  719. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`๐Ÿ”—<class_ItemList_theme_color_font_hovered_color>`
  720. Text :ref:`Color<class_Color>` used when the item is hovered and not selected yet.
  721. .. rst-class:: classref-item-separator
  722. ----
  723. .. _class_ItemList_theme_color_font_outline_color:
  724. .. rst-class:: classref-themeproperty
  725. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`๐Ÿ”—<class_ItemList_theme_color_font_outline_color>`
  726. The tint of text outline of the item.
  727. .. rst-class:: classref-item-separator
  728. ----
  729. .. _class_ItemList_theme_color_font_selected_color:
  730. .. rst-class:: classref-themeproperty
  731. :ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_ItemList_theme_color_font_selected_color>`
  732. Text :ref:`Color<class_Color>` used when the item is selected.
  733. .. rst-class:: classref-item-separator
  734. ----
  735. .. _class_ItemList_theme_color_guide_color:
  736. .. rst-class:: classref-themeproperty
  737. :ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`๐Ÿ”—<class_ItemList_theme_color_guide_color>`
  738. :ref:`Color<class_Color>` of the guideline. The guideline is a line drawn between each row of items.
  739. .. rst-class:: classref-item-separator
  740. ----
  741. .. _class_ItemList_theme_constant_h_separation:
  742. .. rst-class:: classref-themeproperty
  743. :ref:`int<class_int>` **h_separation** = ``4`` :ref:`๐Ÿ”—<class_ItemList_theme_constant_h_separation>`
  744. The horizontal spacing between items.
  745. .. rst-class:: classref-item-separator
  746. ----
  747. .. _class_ItemList_theme_constant_icon_margin:
  748. .. rst-class:: classref-themeproperty
  749. :ref:`int<class_int>` **icon_margin** = ``4`` :ref:`๐Ÿ”—<class_ItemList_theme_constant_icon_margin>`
  750. The spacing between item's icon and text.
  751. .. rst-class:: classref-item-separator
  752. ----
  753. .. _class_ItemList_theme_constant_line_separation:
  754. .. rst-class:: classref-themeproperty
  755. :ref:`int<class_int>` **line_separation** = ``2`` :ref:`๐Ÿ”—<class_ItemList_theme_constant_line_separation>`
  756. The vertical spacing between each line of text.
  757. .. rst-class:: classref-item-separator
  758. ----
  759. .. _class_ItemList_theme_constant_outline_size:
  760. .. rst-class:: classref-themeproperty
  761. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`๐Ÿ”—<class_ItemList_theme_constant_outline_size>`
  762. The size of the item text outline.
  763. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_ItemList_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  764. .. rst-class:: classref-item-separator
  765. ----
  766. .. _class_ItemList_theme_constant_v_separation:
  767. .. rst-class:: classref-themeproperty
  768. :ref:`int<class_int>` **v_separation** = ``4`` :ref:`๐Ÿ”—<class_ItemList_theme_constant_v_separation>`
  769. The vertical spacing between items.
  770. .. rst-class:: classref-item-separator
  771. ----
  772. .. _class_ItemList_theme_font_font:
  773. .. rst-class:: classref-themeproperty
  774. :ref:`Font<class_Font>` **font** :ref:`๐Ÿ”—<class_ItemList_theme_font_font>`
  775. :ref:`Font<class_Font>` of the item's text.
  776. .. rst-class:: classref-item-separator
  777. ----
  778. .. _class_ItemList_theme_font_size_font_size:
  779. .. rst-class:: classref-themeproperty
  780. :ref:`int<class_int>` **font_size** :ref:`๐Ÿ”—<class_ItemList_theme_font_size_font_size>`
  781. Font size of the item's text.
  782. .. rst-class:: classref-item-separator
  783. ----
  784. .. _class_ItemList_theme_style_cursor:
  785. .. rst-class:: classref-themeproperty
  786. :ref:`StyleBox<class_StyleBox>` **cursor** :ref:`๐Ÿ”—<class_ItemList_theme_style_cursor>`
  787. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is being focused.
  788. .. rst-class:: classref-item-separator
  789. ----
  790. .. _class_ItemList_theme_style_cursor_unfocused:
  791. .. rst-class:: classref-themeproperty
  792. :ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`๐Ÿ”—<class_ItemList_theme_style_cursor_unfocused>`
  793. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is not being focused.
  794. .. rst-class:: classref-item-separator
  795. ----
  796. .. _class_ItemList_theme_style_focus:
  797. .. rst-class:: classref-themeproperty
  798. :ref:`StyleBox<class_StyleBox>` **focus** :ref:`๐Ÿ”—<class_ItemList_theme_style_focus>`
  799. The focused style for the **ItemList**, drawn on top of the background, but below everything else.
  800. .. rst-class:: classref-item-separator
  801. ----
  802. .. _class_ItemList_theme_style_hovered:
  803. .. rst-class:: classref-themeproperty
  804. :ref:`StyleBox<class_StyleBox>` **hovered** :ref:`๐Ÿ”—<class_ItemList_theme_style_hovered>`
  805. :ref:`StyleBox<class_StyleBox>` for the hovered, but not selected items.
  806. .. rst-class:: classref-item-separator
  807. ----
  808. .. _class_ItemList_theme_style_panel:
  809. .. rst-class:: classref-themeproperty
  810. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`๐Ÿ”—<class_ItemList_theme_style_panel>`
  811. The background style for the **ItemList**.
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_ItemList_theme_style_selected:
  815. .. rst-class:: classref-themeproperty
  816. :ref:`StyleBox<class_StyleBox>` **selected** :ref:`๐Ÿ”—<class_ItemList_theme_style_selected>`
  817. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is not being focused.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _class_ItemList_theme_style_selected_focus:
  821. .. rst-class:: classref-themeproperty
  822. :ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`๐Ÿ”—<class_ItemList_theme_style_selected_focus>`
  823. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is being focused.
  824. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  825. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  826. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  827. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  828. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  829. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  830. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  831. .. |void| replace:: :abbr:`void (No return value.)`