class_itemlist.rst 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507
  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_hovered_selected_color<class_ItemList_theme_color_font_hovered_selected_color>` | ``Color(1, 1, 1, 1)`` |
  170. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  171. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ItemList_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  172. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  173. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_ItemList_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
  174. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  175. | :ref:`Color<class_Color>` | :ref:`guide_color<class_ItemList_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` |
  176. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  177. | :ref:`int<class_int>` | :ref:`h_separation<class_ItemList_theme_constant_h_separation>` | ``4`` |
  178. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  179. | :ref:`int<class_int>` | :ref:`icon_margin<class_ItemList_theme_constant_icon_margin>` | ``4`` |
  180. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  181. | :ref:`int<class_int>` | :ref:`line_separation<class_ItemList_theme_constant_line_separation>` | ``2`` |
  182. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  183. | :ref:`int<class_int>` | :ref:`outline_size<class_ItemList_theme_constant_outline_size>` | ``0`` |
  184. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  185. | :ref:`int<class_int>` | :ref:`v_separation<class_ItemList_theme_constant_v_separation>` | ``4`` |
  186. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  187. | :ref:`Font<class_Font>` | :ref:`font<class_ItemList_theme_font_font>` | |
  188. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  189. | :ref:`int<class_int>` | :ref:`font_size<class_ItemList_theme_font_size_font_size>` | |
  190. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  191. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_ItemList_theme_style_cursor>` | |
  192. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  193. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_ItemList_theme_style_cursor_unfocused>` | |
  194. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  195. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_ItemList_theme_style_focus>` | |
  196. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  197. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered<class_ItemList_theme_style_hovered>` | |
  198. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  199. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected<class_ItemList_theme_style_hovered_selected>` | |
  200. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  201. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected_focus<class_ItemList_theme_style_hovered_selected_focus>` | |
  202. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  203. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_ItemList_theme_style_panel>` | |
  204. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  205. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_ItemList_theme_style_selected>` | |
  206. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  207. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_ItemList_theme_style_selected_focus>` | |
  208. +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
  209. .. rst-class:: classref-section-separator
  210. ----
  211. .. rst-class:: classref-descriptions-group
  212. Signals
  213. -------
  214. .. _class_ItemList_signal_empty_clicked:
  215. .. rst-class:: classref-signal
  216. **empty_clicked**\ (\ at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_empty_clicked>`
  217. Emitted when any mouse click is issued within the rect of the list but on empty space.
  218. \ ``at_position`` is the click position in this control's local coordinate system.
  219. .. rst-class:: classref-item-separator
  220. ----
  221. .. _class_ItemList_signal_item_activated:
  222. .. rst-class:: classref-signal
  223. **item_activated**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_activated>`
  224. Emitted when specified list item is activated via double-clicking or by pressing :kbd:`Enter`.
  225. .. rst-class:: classref-item-separator
  226. ----
  227. .. _class_ItemList_signal_item_clicked:
  228. .. rst-class:: classref-signal
  229. **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>`
  230. Emitted when specified list item has been clicked with any mouse button.
  231. \ ``at_position`` is the click position in this control's local coordinate system.
  232. .. rst-class:: classref-item-separator
  233. ----
  234. .. _class_ItemList_signal_item_selected:
  235. .. rst-class:: classref-signal
  236. **item_selected**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_selected>`
  237. Emitted when specified item has been selected. Only applicable in single selection mode.
  238. \ :ref:`allow_reselect<class_ItemList_property_allow_reselect>` must be enabled to reselect an item.
  239. .. rst-class:: classref-item-separator
  240. ----
  241. .. _class_ItemList_signal_multi_selected:
  242. .. rst-class:: classref-signal
  243. **multi_selected**\ (\ index\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_signal_multi_selected>`
  244. Emitted when a multiple selection is altered on a list allowing multiple selection.
  245. .. rst-class:: classref-section-separator
  246. ----
  247. .. rst-class:: classref-descriptions-group
  248. Enumerations
  249. ------------
  250. .. _enum_ItemList_IconMode:
  251. .. rst-class:: classref-enumeration
  252. enum **IconMode**: :ref:`🔗<enum_ItemList_IconMode>`
  253. .. _class_ItemList_constant_ICON_MODE_TOP:
  254. .. rst-class:: classref-enumeration-constant
  255. :ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_TOP** = ``0``
  256. Icon is drawn above the text.
  257. .. _class_ItemList_constant_ICON_MODE_LEFT:
  258. .. rst-class:: classref-enumeration-constant
  259. :ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_LEFT** = ``1``
  260. Icon is drawn to the left of the text.
  261. .. rst-class:: classref-item-separator
  262. ----
  263. .. _enum_ItemList_SelectMode:
  264. .. rst-class:: classref-enumeration
  265. enum **SelectMode**: :ref:`🔗<enum_ItemList_SelectMode>`
  266. .. _class_ItemList_constant_SELECT_SINGLE:
  267. .. rst-class:: classref-enumeration-constant
  268. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_SINGLE** = ``0``
  269. Only allow selecting a single item.
  270. .. _class_ItemList_constant_SELECT_MULTI:
  271. .. rst-class:: classref-enumeration-constant
  272. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_MULTI** = ``1``
  273. Allows selecting multiple items by holding :kbd:`Ctrl` or :kbd:`Shift`.
  274. .. _class_ItemList_constant_SELECT_TOGGLE:
  275. .. rst-class:: classref-enumeration-constant
  276. :ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_TOGGLE** = ``2``
  277. Allows selecting multiple items by toggling them on and off.
  278. .. rst-class:: classref-section-separator
  279. ----
  280. .. rst-class:: classref-descriptions-group
  281. Property Descriptions
  282. ---------------------
  283. .. _class_ItemList_property_allow_reselect:
  284. .. rst-class:: classref-property
  285. :ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_ItemList_property_allow_reselect>`
  286. .. rst-class:: classref-property-setget
  287. - |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ )
  288. - :ref:`bool<class_bool>` **get_allow_reselect**\ (\ )
  289. If ``true``, the currently selected item can be selected again.
  290. .. rst-class:: classref-item-separator
  291. ----
  292. .. _class_ItemList_property_allow_rmb_select:
  293. .. rst-class:: classref-property
  294. :ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_ItemList_property_allow_rmb_select>`
  295. .. rst-class:: classref-property-setget
  296. - |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ )
  297. - :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ )
  298. If ``true``, right mouse button click can select items.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_ItemList_property_allow_search:
  302. .. rst-class:: classref-property
  303. :ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_ItemList_property_allow_search>`
  304. .. rst-class:: classref-property-setget
  305. - |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ )
  306. - :ref:`bool<class_bool>` **get_allow_search**\ (\ )
  307. If ``true``, allows navigating the **ItemList** with letter keys through incremental search.
  308. .. rst-class:: classref-item-separator
  309. ----
  310. .. _class_ItemList_property_auto_height:
  311. .. rst-class:: classref-property
  312. :ref:`bool<class_bool>` **auto_height** = ``false`` :ref:`🔗<class_ItemList_property_auto_height>`
  313. .. rst-class:: classref-property-setget
  314. - |void| **set_auto_height**\ (\ value\: :ref:`bool<class_bool>`\ )
  315. - :ref:`bool<class_bool>` **has_auto_height**\ (\ )
  316. If ``true``, the control will automatically resize the height to fit its content.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_ItemList_property_auto_width:
  320. .. rst-class:: classref-property
  321. :ref:`bool<class_bool>` **auto_width** = ``false`` :ref:`🔗<class_ItemList_property_auto_width>`
  322. .. rst-class:: classref-property-setget
  323. - |void| **set_auto_width**\ (\ value\: :ref:`bool<class_bool>`\ )
  324. - :ref:`bool<class_bool>` **has_auto_width**\ (\ )
  325. If ``true``, the control will automatically resize the width to fit its content.
  326. .. rst-class:: classref-item-separator
  327. ----
  328. .. _class_ItemList_property_fixed_column_width:
  329. .. rst-class:: classref-property
  330. :ref:`int<class_int>` **fixed_column_width** = ``0`` :ref:`🔗<class_ItemList_property_fixed_column_width>`
  331. .. rst-class:: classref-property-setget
  332. - |void| **set_fixed_column_width**\ (\ value\: :ref:`int<class_int>`\ )
  333. - :ref:`int<class_int>` **get_fixed_column_width**\ (\ )
  334. The width all columns will be adjusted to.
  335. 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.
  336. .. rst-class:: classref-item-separator
  337. ----
  338. .. _class_ItemList_property_fixed_icon_size:
  339. .. rst-class:: classref-property
  340. :ref:`Vector2i<class_Vector2i>` **fixed_icon_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_ItemList_property_fixed_icon_size>`
  341. .. rst-class:: classref-property-setget
  342. - |void| **set_fixed_icon_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  343. - :ref:`Vector2i<class_Vector2i>` **get_fixed_icon_size**\ (\ )
  344. The size all icons will be adjusted to.
  345. If either X or Y component is not greater than zero, icon size won't be affected.
  346. .. rst-class:: classref-item-separator
  347. ----
  348. .. _class_ItemList_property_icon_mode:
  349. .. rst-class:: classref-property
  350. :ref:`IconMode<enum_ItemList_IconMode>` **icon_mode** = ``1`` :ref:`🔗<class_ItemList_property_icon_mode>`
  351. .. rst-class:: classref-property-setget
  352. - |void| **set_icon_mode**\ (\ value\: :ref:`IconMode<enum_ItemList_IconMode>`\ )
  353. - :ref:`IconMode<enum_ItemList_IconMode>` **get_icon_mode**\ (\ )
  354. The icon position, whether above or to the left of the text. See the :ref:`IconMode<enum_ItemList_IconMode>` constants.
  355. .. rst-class:: classref-item-separator
  356. ----
  357. .. _class_ItemList_property_icon_scale:
  358. .. rst-class:: classref-property
  359. :ref:`float<class_float>` **icon_scale** = ``1.0`` :ref:`🔗<class_ItemList_property_icon_scale>`
  360. .. rst-class:: classref-property-setget
  361. - |void| **set_icon_scale**\ (\ value\: :ref:`float<class_float>`\ )
  362. - :ref:`float<class_float>` **get_icon_scale**\ (\ )
  363. The scale of icon applied after :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` and transposing takes effect.
  364. .. rst-class:: classref-item-separator
  365. ----
  366. .. _class_ItemList_property_item_count:
  367. .. rst-class:: classref-property
  368. :ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_ItemList_property_item_count>`
  369. .. rst-class:: classref-property-setget
  370. - |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ )
  371. - :ref:`int<class_int>` **get_item_count**\ (\ )
  372. The number of items currently in the list.
  373. .. rst-class:: classref-item-separator
  374. ----
  375. .. _class_ItemList_property_max_columns:
  376. .. rst-class:: classref-property
  377. :ref:`int<class_int>` **max_columns** = ``1`` :ref:`🔗<class_ItemList_property_max_columns>`
  378. .. rst-class:: classref-property-setget
  379. - |void| **set_max_columns**\ (\ value\: :ref:`int<class_int>`\ )
  380. - :ref:`int<class_int>` **get_max_columns**\ (\ )
  381. Maximum columns the list will have.
  382. If greater than zero, the content will be split among the specified columns.
  383. A value of zero means unlimited columns, i.e. all items will be put in the same row.
  384. .. rst-class:: classref-item-separator
  385. ----
  386. .. _class_ItemList_property_max_text_lines:
  387. .. rst-class:: classref-property
  388. :ref:`int<class_int>` **max_text_lines** = ``1`` :ref:`🔗<class_ItemList_property_max_text_lines>`
  389. .. rst-class:: classref-property-setget
  390. - |void| **set_max_text_lines**\ (\ value\: :ref:`int<class_int>`\ )
  391. - :ref:`int<class_int>` **get_max_text_lines**\ (\ )
  392. Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.
  393. \ **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.
  394. .. rst-class:: classref-item-separator
  395. ----
  396. .. _class_ItemList_property_same_column_width:
  397. .. rst-class:: classref-property
  398. :ref:`bool<class_bool>` **same_column_width** = ``false`` :ref:`🔗<class_ItemList_property_same_column_width>`
  399. .. rst-class:: classref-property-setget
  400. - |void| **set_same_column_width**\ (\ value\: :ref:`bool<class_bool>`\ )
  401. - :ref:`bool<class_bool>` **is_same_column_width**\ (\ )
  402. Whether all columns will have the same width.
  403. If ``true``, the width is equal to the largest column width of all columns.
  404. .. rst-class:: classref-item-separator
  405. ----
  406. .. _class_ItemList_property_select_mode:
  407. .. rst-class:: classref-property
  408. :ref:`SelectMode<enum_ItemList_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_ItemList_property_select_mode>`
  409. .. rst-class:: classref-property-setget
  410. - |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_ItemList_SelectMode>`\ )
  411. - :ref:`SelectMode<enum_ItemList_SelectMode>` **get_select_mode**\ (\ )
  412. Allows single or multiple item selection. See the :ref:`SelectMode<enum_ItemList_SelectMode>` constants.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_ItemList_property_text_overrun_behavior:
  416. .. rst-class:: classref-property
  417. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` :ref:`🔗<class_ItemList_property_text_overrun_behavior>`
  418. .. rst-class:: classref-property-setget
  419. - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ )
  420. - :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ )
  421. 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.
  422. .. rst-class:: classref-section-separator
  423. ----
  424. .. rst-class:: classref-descriptions-group
  425. Method Descriptions
  426. -------------------
  427. .. _class_ItemList_method_add_icon_item:
  428. .. rst-class:: classref-method
  429. :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>`
  430. Adds an item to the item list with no text, only an icon. Returns the index of an added item.
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _class_ItemList_method_add_item:
  434. .. rst-class:: classref-method
  435. :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>`
  436. Adds an item to the item list with specified text. Returns the index of an added item.
  437. Specify an ``icon``, or use ``null`` as the ``icon`` for a list item with no icon.
  438. If ``selectable`` is ``true``, the list item will be selectable.
  439. .. rst-class:: classref-item-separator
  440. ----
  441. .. _class_ItemList_method_clear:
  442. .. rst-class:: classref-method
  443. |void| **clear**\ (\ ) :ref:`🔗<class_ItemList_method_clear>`
  444. Removes all items from the list.
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_ItemList_method_deselect:
  448. .. rst-class:: classref-method
  449. |void| **deselect**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_deselect>`
  450. Ensures the item associated with the specified index is not selected.
  451. .. rst-class:: classref-item-separator
  452. ----
  453. .. _class_ItemList_method_deselect_all:
  454. .. rst-class:: classref-method
  455. |void| **deselect_all**\ (\ ) :ref:`🔗<class_ItemList_method_deselect_all>`
  456. Ensures there are no items selected.
  457. .. rst-class:: classref-item-separator
  458. ----
  459. .. _class_ItemList_method_ensure_current_is_visible:
  460. .. rst-class:: classref-method
  461. |void| **ensure_current_is_visible**\ (\ ) :ref:`🔗<class_ItemList_method_ensure_current_is_visible>`
  462. Ensure current selection is visible, adjusting the scroll position as necessary.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_ItemList_method_force_update_list_size:
  466. .. rst-class:: classref-method
  467. |void| **force_update_list_size**\ (\ ) :ref:`🔗<class_ItemList_method_force_update_list_size>`
  468. 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.
  469. .. rst-class:: classref-item-separator
  470. ----
  471. .. _class_ItemList_method_get_item_at_position:
  472. .. rst-class:: classref-method
  473. :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>`
  474. Returns the item index at the given ``position``.
  475. 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.
  476. \ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_ItemList_method_get_item_auto_translate_mode:
  480. .. rst-class:: classref-method
  481. :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>`
  482. Returns item's auto translate mode.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_ItemList_method_get_item_custom_bg_color:
  486. .. rst-class:: classref-method
  487. :ref:`Color<class_Color>` **get_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_bg_color>`
  488. Returns the custom background color of the item specified by ``idx`` index.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_ItemList_method_get_item_custom_fg_color:
  492. .. rst-class:: classref-method
  493. :ref:`Color<class_Color>` **get_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_fg_color>`
  494. Returns the custom foreground color of the item specified by ``idx`` index.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_ItemList_method_get_item_icon:
  498. .. rst-class:: classref-method
  499. :ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon>`
  500. Returns the icon associated with the specified index.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_ItemList_method_get_item_icon_modulate:
  504. .. rst-class:: classref-method
  505. :ref:`Color<class_Color>` **get_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_modulate>`
  506. Returns a :ref:`Color<class_Color>` modulating item's icon at the specified index.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _class_ItemList_method_get_item_icon_region:
  510. .. rst-class:: classref-method
  511. :ref:`Rect2<class_Rect2>` **get_item_icon_region**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_region>`
  512. Returns the region of item's icon used. The whole icon will be used if the region has no area.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_ItemList_method_get_item_language:
  516. .. rst-class:: classref-method
  517. :ref:`String<class_String>` **get_item_language**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_language>`
  518. Returns item's text language code.
  519. .. rst-class:: classref-item-separator
  520. ----
  521. .. _class_ItemList_method_get_item_metadata:
  522. .. rst-class:: classref-method
  523. :ref:`Variant<class_Variant>` **get_item_metadata**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_metadata>`
  524. Returns the metadata value of the specified index.
  525. .. rst-class:: classref-item-separator
  526. ----
  527. .. _class_ItemList_method_get_item_rect:
  528. .. rst-class:: classref-method
  529. :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>`
  530. 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.
  531. \ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame.
  532. .. rst-class:: classref-item-separator
  533. ----
  534. .. _class_ItemList_method_get_item_text:
  535. .. rst-class:: classref-method
  536. :ref:`String<class_String>` **get_item_text**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text>`
  537. Returns the text associated with the specified index.
  538. .. rst-class:: classref-item-separator
  539. ----
  540. .. _class_ItemList_method_get_item_text_direction:
  541. .. rst-class:: classref-method
  542. :ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text_direction>`
  543. Returns item's text base writing direction.
  544. .. rst-class:: classref-item-separator
  545. ----
  546. .. _class_ItemList_method_get_item_tooltip:
  547. .. rst-class:: classref-method
  548. :ref:`String<class_String>` **get_item_tooltip**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_tooltip>`
  549. Returns the tooltip hint associated with the specified index.
  550. .. rst-class:: classref-item-separator
  551. ----
  552. .. _class_ItemList_method_get_selected_items:
  553. .. rst-class:: classref-method
  554. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_selected_items**\ (\ ) :ref:`🔗<class_ItemList_method_get_selected_items>`
  555. Returns an array with the indexes of the selected items.
  556. .. rst-class:: classref-item-separator
  557. ----
  558. .. _class_ItemList_method_get_v_scroll_bar:
  559. .. rst-class:: classref-method
  560. :ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_ItemList_method_get_v_scroll_bar>`
  561. Returns the vertical scrollbar.
  562. \ **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.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_ItemList_method_is_anything_selected:
  566. .. rst-class:: classref-method
  567. :ref:`bool<class_bool>` **is_anything_selected**\ (\ ) :ref:`🔗<class_ItemList_method_is_anything_selected>`
  568. Returns ``true`` if one or more items are selected.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_ItemList_method_is_item_disabled:
  572. .. rst-class:: classref-method
  573. :ref:`bool<class_bool>` **is_item_disabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_disabled>`
  574. Returns ``true`` if the item at the specified index is disabled.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_ItemList_method_is_item_icon_transposed:
  578. .. rst-class:: classref-method
  579. :ref:`bool<class_bool>` **is_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_icon_transposed>`
  580. Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped.
  581. .. rst-class:: classref-item-separator
  582. ----
  583. .. _class_ItemList_method_is_item_selectable:
  584. .. rst-class:: classref-method
  585. :ref:`bool<class_bool>` **is_item_selectable**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_selectable>`
  586. Returns ``true`` if the item at the specified index is selectable.
  587. .. rst-class:: classref-item-separator
  588. ----
  589. .. _class_ItemList_method_is_item_tooltip_enabled:
  590. .. rst-class:: classref-method
  591. :ref:`bool<class_bool>` **is_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_tooltip_enabled>`
  592. Returns ``true`` if the tooltip is enabled for specified item index.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_ItemList_method_is_selected:
  596. .. rst-class:: classref-method
  597. :ref:`bool<class_bool>` **is_selected**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_selected>`
  598. Returns ``true`` if the item at the specified index is currently selected.
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_ItemList_method_move_item:
  602. .. rst-class:: classref-method
  603. |void| **move_item**\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_move_item>`
  604. Moves item from index ``from_idx`` to ``to_idx``.
  605. .. rst-class:: classref-item-separator
  606. ----
  607. .. _class_ItemList_method_remove_item:
  608. .. rst-class:: classref-method
  609. |void| **remove_item**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_remove_item>`
  610. Removes the item specified by ``idx`` index from the list.
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _class_ItemList_method_select:
  614. .. rst-class:: classref-method
  615. |void| **select**\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_select>`
  616. Select the item at the specified index.
  617. \ **Note:** This method does not trigger the item selection signal.
  618. .. rst-class:: classref-item-separator
  619. ----
  620. .. _class_ItemList_method_set_item_auto_translate_mode:
  621. .. rst-class:: classref-method
  622. |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>`
  623. Sets the auto translate mode of the item associated with the specified index.
  624. 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.
  625. .. rst-class:: classref-item-separator
  626. ----
  627. .. _class_ItemList_method_set_item_custom_bg_color:
  628. .. rst-class:: classref-method
  629. |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>`
  630. Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`.
  631. .. rst-class:: classref-item-separator
  632. ----
  633. .. _class_ItemList_method_set_item_custom_fg_color:
  634. .. rst-class:: classref-method
  635. |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>`
  636. Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`.
  637. .. rst-class:: classref-item-separator
  638. ----
  639. .. _class_ItemList_method_set_item_disabled:
  640. .. rst-class:: classref-method
  641. |void| **set_item_disabled**\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_disabled>`
  642. Disables (or enables) the item at the specified index.
  643. Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing :kbd:`Enter`).
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_ItemList_method_set_item_icon:
  647. .. rst-class:: classref-method
  648. |void| **set_item_icon**\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon>`
  649. Sets (or replaces) the icon's :ref:`Texture2D<class_Texture2D>` associated with the specified index.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_ItemList_method_set_item_icon_modulate:
  653. .. rst-class:: classref-method
  654. |void| **set_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_modulate>`
  655. Sets a modulating :ref:`Color<class_Color>` of the item associated with the specified index.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_ItemList_method_set_item_icon_region:
  659. .. rst-class:: classref-method
  660. |void| **set_item_icon_region**\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_region>`
  661. Sets the region of item's icon used. The whole icon will be used if the region has no area.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_ItemList_method_set_item_icon_transposed:
  665. .. rst-class:: classref-method
  666. |void| **set_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_transposed>`
  667. Sets whether the item icon will be drawn transposed.
  668. .. rst-class:: classref-item-separator
  669. ----
  670. .. _class_ItemList_method_set_item_language:
  671. .. rst-class:: classref-method
  672. |void| **set_item_language**\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_language>`
  673. Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  674. .. rst-class:: classref-item-separator
  675. ----
  676. .. _class_ItemList_method_set_item_metadata:
  677. .. rst-class:: classref-method
  678. |void| **set_item_metadata**\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ItemList_method_set_item_metadata>`
  679. Sets a value (of any type) to be stored with the item associated with the specified index.
  680. .. rst-class:: classref-item-separator
  681. ----
  682. .. _class_ItemList_method_set_item_selectable:
  683. .. rst-class:: classref-method
  684. |void| **set_item_selectable**\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_selectable>`
  685. Allows or disallows selection of the item associated with the specified index.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _class_ItemList_method_set_item_text:
  689. .. rst-class:: classref-method
  690. |void| **set_item_text**\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_text>`
  691. Sets text of the item associated with the specified index.
  692. .. rst-class:: classref-item-separator
  693. ----
  694. .. _class_ItemList_method_set_item_text_direction:
  695. .. rst-class:: classref-method
  696. |void| **set_item_text_direction**\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_ItemList_method_set_item_text_direction>`
  697. Sets item's text base writing direction.
  698. .. rst-class:: classref-item-separator
  699. ----
  700. .. _class_ItemList_method_set_item_tooltip:
  701. .. rst-class:: classref-method
  702. |void| **set_item_tooltip**\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip>`
  703. Sets the tooltip hint for the item associated with the specified index.
  704. .. rst-class:: classref-item-separator
  705. ----
  706. .. _class_ItemList_method_set_item_tooltip_enabled:
  707. .. rst-class:: classref-method
  708. |void| **set_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip_enabled>`
  709. Sets whether the tooltip hint is enabled for specified item index.
  710. .. rst-class:: classref-item-separator
  711. ----
  712. .. _class_ItemList_method_sort_items_by_text:
  713. .. rst-class:: classref-method
  714. |void| **sort_items_by_text**\ (\ ) :ref:`🔗<class_ItemList_method_sort_items_by_text>`
  715. Sorts items in the list by their text.
  716. .. rst-class:: classref-section-separator
  717. ----
  718. .. rst-class:: classref-descriptions-group
  719. Theme Property Descriptions
  720. ---------------------------
  721. .. _class_ItemList_theme_color_font_color:
  722. .. rst-class:: classref-themeproperty
  723. :ref:`Color<class_Color>` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` :ref:`🔗<class_ItemList_theme_color_font_color>`
  724. Default text :ref:`Color<class_Color>` of the item.
  725. .. rst-class:: classref-item-separator
  726. ----
  727. .. _class_ItemList_theme_color_font_hovered_color:
  728. .. rst-class:: classref-themeproperty
  729. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_color>`
  730. Text :ref:`Color<class_Color>` used when the item is hovered and not selected yet.
  731. .. rst-class:: classref-item-separator
  732. ----
  733. .. _class_ItemList_theme_color_font_hovered_selected_color:
  734. .. rst-class:: classref-themeproperty
  735. :ref:`Color<class_Color>` **font_hovered_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_selected_color>`
  736. Text :ref:`Color<class_Color>` used when the item is hovered and selected.
  737. .. rst-class:: classref-item-separator
  738. ----
  739. .. _class_ItemList_theme_color_font_outline_color:
  740. .. rst-class:: classref-themeproperty
  741. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ItemList_theme_color_font_outline_color>`
  742. The tint of text outline of the item.
  743. .. rst-class:: classref-item-separator
  744. ----
  745. .. _class_ItemList_theme_color_font_selected_color:
  746. .. rst-class:: classref-themeproperty
  747. :ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_selected_color>`
  748. Text :ref:`Color<class_Color>` used when the item is selected, but not hovered.
  749. .. rst-class:: classref-item-separator
  750. ----
  751. .. _class_ItemList_theme_color_guide_color:
  752. .. rst-class:: classref-themeproperty
  753. :ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_ItemList_theme_color_guide_color>`
  754. :ref:`Color<class_Color>` of the guideline. The guideline is a line drawn between each row of items.
  755. .. rst-class:: classref-item-separator
  756. ----
  757. .. _class_ItemList_theme_constant_h_separation:
  758. .. rst-class:: classref-themeproperty
  759. :ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_h_separation>`
  760. The horizontal spacing between items.
  761. .. rst-class:: classref-item-separator
  762. ----
  763. .. _class_ItemList_theme_constant_icon_margin:
  764. .. rst-class:: classref-themeproperty
  765. :ref:`int<class_int>` **icon_margin** = ``4`` :ref:`🔗<class_ItemList_theme_constant_icon_margin>`
  766. The spacing between item's icon and text.
  767. .. rst-class:: classref-item-separator
  768. ----
  769. .. _class_ItemList_theme_constant_line_separation:
  770. .. rst-class:: classref-themeproperty
  771. :ref:`int<class_int>` **line_separation** = ``2`` :ref:`🔗<class_ItemList_theme_constant_line_separation>`
  772. The vertical spacing between each line of text.
  773. .. rst-class:: classref-item-separator
  774. ----
  775. .. _class_ItemList_theme_constant_outline_size:
  776. .. rst-class:: classref-themeproperty
  777. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_ItemList_theme_constant_outline_size>`
  778. The size of the item text outline.
  779. \ **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.
  780. .. rst-class:: classref-item-separator
  781. ----
  782. .. _class_ItemList_theme_constant_v_separation:
  783. .. rst-class:: classref-themeproperty
  784. :ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_v_separation>`
  785. The vertical spacing between items.
  786. .. rst-class:: classref-item-separator
  787. ----
  788. .. _class_ItemList_theme_font_font:
  789. .. rst-class:: classref-themeproperty
  790. :ref:`Font<class_Font>` **font** :ref:`🔗<class_ItemList_theme_font_font>`
  791. :ref:`Font<class_Font>` of the item's text.
  792. .. rst-class:: classref-item-separator
  793. ----
  794. .. _class_ItemList_theme_font_size_font_size:
  795. .. rst-class:: classref-themeproperty
  796. :ref:`int<class_int>` **font_size** :ref:`🔗<class_ItemList_theme_font_size_font_size>`
  797. Font size of the item's text.
  798. .. rst-class:: classref-item-separator
  799. ----
  800. .. _class_ItemList_theme_style_cursor:
  801. .. rst-class:: classref-themeproperty
  802. :ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_ItemList_theme_style_cursor>`
  803. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is being focused.
  804. .. rst-class:: classref-item-separator
  805. ----
  806. .. _class_ItemList_theme_style_cursor_unfocused:
  807. .. rst-class:: classref-themeproperty
  808. :ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_ItemList_theme_style_cursor_unfocused>`
  809. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is not being focused.
  810. .. rst-class:: classref-item-separator
  811. ----
  812. .. _class_ItemList_theme_style_focus:
  813. .. rst-class:: classref-themeproperty
  814. :ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_ItemList_theme_style_focus>`
  815. The focused style for the **ItemList**, drawn on top of the background, but below everything else.
  816. .. rst-class:: classref-item-separator
  817. ----
  818. .. _class_ItemList_theme_style_hovered:
  819. .. rst-class:: classref-themeproperty
  820. :ref:`StyleBox<class_StyleBox>` **hovered** :ref:`🔗<class_ItemList_theme_style_hovered>`
  821. :ref:`StyleBox<class_StyleBox>` for the hovered, but not selected items.
  822. .. rst-class:: classref-item-separator
  823. ----
  824. .. _class_ItemList_theme_style_hovered_selected:
  825. .. rst-class:: classref-themeproperty
  826. :ref:`StyleBox<class_StyleBox>` **hovered_selected** :ref:`🔗<class_ItemList_theme_style_hovered_selected>`
  827. :ref:`StyleBox<class_StyleBox>` for the hovered and selected items, used when the **ItemList** is not being focused.
  828. .. rst-class:: classref-item-separator
  829. ----
  830. .. _class_ItemList_theme_style_hovered_selected_focus:
  831. .. rst-class:: classref-themeproperty
  832. :ref:`StyleBox<class_StyleBox>` **hovered_selected_focus** :ref:`🔗<class_ItemList_theme_style_hovered_selected_focus>`
  833. :ref:`StyleBox<class_StyleBox>` for the hovered and selected items, used when the **ItemList** is being focused.
  834. .. rst-class:: classref-item-separator
  835. ----
  836. .. _class_ItemList_theme_style_panel:
  837. .. rst-class:: classref-themeproperty
  838. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_ItemList_theme_style_panel>`
  839. The background style for the **ItemList**.
  840. .. rst-class:: classref-item-separator
  841. ----
  842. .. _class_ItemList_theme_style_selected:
  843. .. rst-class:: classref-themeproperty
  844. :ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_ItemList_theme_style_selected>`
  845. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is not being focused.
  846. .. rst-class:: classref-item-separator
  847. ----
  848. .. _class_ItemList_theme_style_selected_focus:
  849. .. rst-class:: classref-themeproperty
  850. :ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_ItemList_theme_style_selected_focus>`
  851. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is being focused.
  852. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  853. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  854. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  855. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  856. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  857. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  858. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  859. .. |void| replace:: :abbr:`void (No return value.)`