mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
463 lines
33 KiB
ReStructuredText
463 lines
33 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the ItemList.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_ItemList:
|
|
|
|
ItemList
|
|
========
|
|
|
|
**Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_icon_item<class_ItemList_add_icon_item>` **(** :ref:`Texture<class_texture>` icon, :ref:`bool<class_bool>` selectable=true **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_item<class_ItemList_add_item>` **(** :ref:`String<class_string>` text, :ref:`Texture<class_texture>` icon=null, :ref:`bool<class_bool>` selectable=true **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`clear<class_ItemList_clear>` **(** **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`ensure_current_is_visible<class_ItemList_ensure_current_is_visible>` **(** **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_allow_rmb_select<class_ItemList_get_allow_rmb_select>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_fixed_column_width<class_ItemList_get_fixed_column_width>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_vector2>` | :ref:`get_fixed_icon_size<class_ItemList_get_fixed_icon_size>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_icon_mode<class_ItemList_get_icon_mode>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_icon_scale<class_ItemList_get_icon_scale>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_item_at_position<class_ItemList_get_item_at_position>` **(** :ref:`Vector2<class_vector2>` position, :ref:`bool<class_bool>` exact=false **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_item_count<class_ItemList_get_item_count>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_color>` | :ref:`get_item_custom_bg_color<class_ItemList_get_item_custom_bg_color>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Texture<class_texture>` | :ref:`get_item_icon<class_ItemList_get_item_icon>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Rect2<class_rect2>` | :ref:`get_item_icon_region<class_ItemList_get_item_icon_region>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_variant>` | :ref:`get_item_metadata<class_ItemList_get_item_metadata>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_string>` | :ref:`get_item_text<class_ItemList_get_item_text>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_string>` | :ref:`get_item_tooltip<class_ItemList_get_item_tooltip>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_max_columns<class_ItemList_get_max_columns>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_max_text_lines<class_ItemList_get_max_text_lines>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_select_mode<class_ItemList_get_select_mode>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolIntArray<class_poolintarray>` | :ref:`get_selected_items<class_ItemList_get_selected_items>` **(** **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`VScrollBar<class_vscrollbar>` | :ref:`get_v_scroll<class_ItemList_get_v_scroll>` **(** **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_auto_height<class_ItemList_has_auto_height>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_ItemList_is_item_disabled>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_item_selectable<class_ItemList_is_item_selectable>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_item_tooltip_enabled<class_ItemList_is_item_tooltip_enabled>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_same_column_width<class_ItemList_is_same_column_width>` **(** **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_selected<class_ItemList_is_selected>` **(** :ref:`int<class_int>` idx **)** const |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_item<class_ItemList_remove_item>` **(** :ref:`int<class_int>` idx **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`select<class_ItemList_select>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` single=true **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_allow_rmb_select<class_ItemList_set_allow_rmb_select>` **(** :ref:`bool<class_bool>` allow **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_auto_height<class_ItemList_set_auto_height>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_fixed_column_width<class_ItemList_set_fixed_column_width>` **(** :ref:`int<class_int>` width **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_fixed_icon_size<class_ItemList_set_fixed_icon_size>` **(** :ref:`Vector2<class_vector2>` size **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_icon_mode<class_ItemList_set_icon_mode>` **(** :ref:`int<class_int>` mode **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_icon_scale<class_ItemList_set_icon_scale>` **(** :ref:`float<class_float>` scale **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_custom_bg_color<class_ItemList_set_item_custom_bg_color>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_color>` custom_bg_color **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_disabled<class_ItemList_set_item_disabled>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_icon<class_ItemList_set_item_icon>` **(** :ref:`int<class_int>` idx, :ref:`Texture<class_texture>` icon **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_icon_region<class_ItemList_set_item_icon_region>` **(** :ref:`int<class_int>` idx, :ref:`Rect2<class_rect2>` rect **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_metadata<class_ItemList_set_item_metadata>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_variant>` metadata **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_selectable<class_ItemList_set_item_selectable>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` selectable **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_text<class_ItemList_set_item_text>` **(** :ref:`int<class_int>` idx, :ref:`String<class_string>` text **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_tooltip<class_ItemList_set_item_tooltip>` **(** :ref:`int<class_int>` idx, :ref:`String<class_string>` tooltip **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_item_tooltip_enabled<class_ItemList_set_item_tooltip_enabled>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enable **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_max_columns<class_ItemList_set_max_columns>` **(** :ref:`int<class_int>` amount **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_max_text_lines<class_ItemList_set_max_text_lines>` **(** :ref:`int<class_int>` lines **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_same_column_width<class_ItemList_set_same_column_width>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_select_mode<class_ItemList_set_select_mode>` **(** :ref:`int<class_int>` mode **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`sort_items_by_text<class_ItemList_sort_items_by_text>` **(** **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`unselect<class_ItemList_unselect>` **(** :ref:`int<class_int>` idx **)** |
|
|
+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Signals
|
|
-------
|
|
|
|
- **item_activated** **(** :ref:`int<class_int>` index **)**
|
|
Fired when specified list item is activated via double click or Enter.
|
|
|
|
- **item_rmb_selected** **(** :ref:`int<class_int>` index, :ref:`Vector2<class_vector2>` at_position **)**
|
|
Fired when specified list item has been selected via right mouse clicking.
|
|
|
|
The click position is also provided to allow appropriate popup of context menus
|
|
|
|
at the correct location.
|
|
|
|
- **item_selected** **(** :ref:`int<class_int>` index **)**
|
|
Fired when specified item has been selected.
|
|
|
|
- **multi_selected** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` selected **)**
|
|
Fired when a multiple selection is altered on a list allowing mutliple selection.
|
|
|
|
|
|
Member Variables
|
|
----------------
|
|
|
|
- :ref:`bool<class_bool>` **allow_rmb_select**
|
|
- :ref:`bool<class_bool>` **auto_height**
|
|
- :ref:`int<class_int>` **fixed_column_width**
|
|
- :ref:`int<class_int>` **icon_mode**
|
|
- :ref:`float<class_float>` **icon_scale**
|
|
- :ref:`Array<class_array>` **items**
|
|
- :ref:`int<class_int>` **max_columns**
|
|
- :ref:`int<class_int>` **max_text_lines**
|
|
- :ref:`bool<class_bool>` **same_column_width**
|
|
- :ref:`int<class_int>` **select_mode**
|
|
|
|
Numeric Constants
|
|
-----------------
|
|
|
|
- **ICON_MODE_TOP** = **0**
|
|
- **ICON_MODE_LEFT** = **1**
|
|
- **SELECT_SINGLE** = **0**
|
|
- **SELECT_MULTI** = **1**
|
|
|
|
Description
|
|
-----------
|
|
|
|
This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons,
|
|
|
|
or both text and icon. Tooltips are supported and may be different for every item in the list. 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' with a double click (or Enter key).
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_ItemList_add_icon_item:
|
|
|
|
- void **add_icon_item** **(** :ref:`Texture<class_texture>` icon, :ref:`bool<class_bool>` selectable=true **)**
|
|
|
|
Adds an item to the item list with no text, only an icon.
|
|
|
|
.. _class_ItemList_add_item:
|
|
|
|
- void **add_item** **(** :ref:`String<class_string>` text, :ref:`Texture<class_texture>` icon=null, :ref:`bool<class_bool>` selectable=true **)**
|
|
|
|
Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon.
|
|
|
|
If selectable is true the list item will be selectable.
|
|
|
|
.. _class_ItemList_clear:
|
|
|
|
- void **clear** **(** **)**
|
|
|
|
Remove all items from the list.
|
|
|
|
.. _class_ItemList_ensure_current_is_visible:
|
|
|
|
- void **ensure_current_is_visible** **(** **)**
|
|
|
|
Ensure selection is visible, adjusting the scroll position as necessary.
|
|
|
|
.. _class_ItemList_get_allow_rmb_select:
|
|
|
|
- :ref:`bool<class_bool>` **get_allow_rmb_select** **(** **)** const
|
|
|
|
Return whether or not items may be selected via right mouse clicking.
|
|
|
|
.. _class_ItemList_get_fixed_column_width:
|
|
|
|
- :ref:`int<class_int>` **get_fixed_column_width** **(** **)** const
|
|
|
|
If column size has been fixed to a value, return that value.
|
|
|
|
.. _class_ItemList_get_fixed_icon_size:
|
|
|
|
- :ref:`Vector2<class_vector2>` **get_fixed_icon_size** **(** **)** const
|
|
|
|
.. _class_ItemList_get_icon_mode:
|
|
|
|
- :ref:`int<class_int>` **get_icon_mode** **(** **)** const
|
|
|
|
.. _class_ItemList_get_icon_scale:
|
|
|
|
- :ref:`float<class_float>` **get_icon_scale** **(** **)** const
|
|
|
|
.. _class_ItemList_get_item_at_position:
|
|
|
|
- :ref:`int<class_int>` **get_item_at_position** **(** :ref:`Vector2<class_vector2>` position, :ref:`bool<class_bool>` exact=false **)** const
|
|
|
|
Given a position within the control return the item (if any) at that point.
|
|
|
|
.. _class_ItemList_get_item_count:
|
|
|
|
- :ref:`int<class_int>` **get_item_count** **(** **)** const
|
|
|
|
Return count of items currently in the item list.
|
|
|
|
.. _class_ItemList_get_item_custom_bg_color:
|
|
|
|
- :ref:`Color<class_color>` **get_item_custom_bg_color** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
.. _class_ItemList_get_item_icon:
|
|
|
|
- :ref:`Texture<class_texture>` **get_item_icon** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
.. _class_ItemList_get_item_icon_region:
|
|
|
|
- :ref:`Rect2<class_rect2>` **get_item_icon_region** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
.. _class_ItemList_get_item_metadata:
|
|
|
|
- :ref:`Variant<class_variant>` **get_item_metadata** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
.. _class_ItemList_get_item_text:
|
|
|
|
- :ref:`String<class_string>` **get_item_text** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
Return the text for specified item index.
|
|
|
|
.. _class_ItemList_get_item_tooltip:
|
|
|
|
- :ref:`String<class_string>` **get_item_tooltip** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
Return tooltip hint for specified item index.
|
|
|
|
.. _class_ItemList_get_max_columns:
|
|
|
|
- :ref:`int<class_int>` **get_max_columns** **(** **)** const
|
|
|
|
Return total number of columns in use by the list.
|
|
|
|
.. _class_ItemList_get_max_text_lines:
|
|
|
|
- :ref:`int<class_int>` **get_max_text_lines** **(** **)** const
|
|
|
|
Return total number of lines currently in use by the list.
|
|
|
|
.. _class_ItemList_get_select_mode:
|
|
|
|
- :ref:`int<class_int>` **get_select_mode** **(** **)** const
|
|
|
|
.. _class_ItemList_get_selected_items:
|
|
|
|
- :ref:`PoolIntArray<class_poolintarray>` **get_selected_items** **(** **)**
|
|
|
|
Returns the list of selected indexes.
|
|
|
|
.. _class_ItemList_get_v_scroll:
|
|
|
|
- :ref:`VScrollBar<class_vscrollbar>` **get_v_scroll** **(** **)**
|
|
|
|
Returns the current vertical scroll bar for the List.
|
|
|
|
.. _class_ItemList_has_auto_height:
|
|
|
|
- :ref:`bool<class_bool>` **has_auto_height** **(** **)** const
|
|
|
|
.. _class_ItemList_is_item_disabled:
|
|
|
|
- :ref:`bool<class_bool>` **is_item_disabled** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
Returns whether or not the item at the specified index is disabled
|
|
|
|
.. _class_ItemList_is_item_selectable:
|
|
|
|
- :ref:`bool<class_bool>` **is_item_selectable** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
Returns whether or not the item at the specified index is selectable.
|
|
|
|
.. _class_ItemList_is_item_tooltip_enabled:
|
|
|
|
- :ref:`bool<class_bool>` **is_item_tooltip_enabled** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
Returns whether the tooptip is enabled for specified item index.
|
|
|
|
.. _class_ItemList_is_same_column_width:
|
|
|
|
- :ref:`bool<class_bool>` **is_same_column_width** **(** **)** const
|
|
|
|
Returns whether or not all columns of the list are of the same size.
|
|
|
|
.. _class_ItemList_is_selected:
|
|
|
|
- :ref:`bool<class_bool>` **is_selected** **(** :ref:`int<class_int>` idx **)** const
|
|
|
|
Returns whether or not item at the specified index is currently selected.
|
|
|
|
.. _class_ItemList_remove_item:
|
|
|
|
- void **remove_item** **(** :ref:`int<class_int>` idx **)**
|
|
|
|
Remove item at specified index from the list.
|
|
|
|
.. _class_ItemList_select:
|
|
|
|
- void **select** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` single=true **)**
|
|
|
|
Select the item at the specified index.
|
|
|
|
Note: This method does not trigger the item selection signal.
|
|
|
|
.. _class_ItemList_set_allow_rmb_select:
|
|
|
|
- void **set_allow_rmb_select** **(** :ref:`bool<class_bool>` allow **)**
|
|
|
|
Allow (or disallow) selection of (selectable) items in the list using right mouse button.
|
|
|
|
.. _class_ItemList_set_auto_height:
|
|
|
|
- void **set_auto_height** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
.. _class_ItemList_set_fixed_column_width:
|
|
|
|
- void **set_fixed_column_width** **(** :ref:`int<class_int>` width **)**
|
|
|
|
Set the size (width) all columns in the list are to use.
|
|
|
|
.. _class_ItemList_set_fixed_icon_size:
|
|
|
|
- void **set_fixed_icon_size** **(** :ref:`Vector2<class_vector2>` size **)**
|
|
|
|
.. _class_ItemList_set_icon_mode:
|
|
|
|
- void **set_icon_mode** **(** :ref:`int<class_int>` mode **)**
|
|
|
|
.. _class_ItemList_set_icon_scale:
|
|
|
|
- void **set_icon_scale** **(** :ref:`float<class_float>` scale **)**
|
|
|
|
.. _class_ItemList_set_item_custom_bg_color:
|
|
|
|
- void **set_item_custom_bg_color** **(** :ref:`int<class_int>` idx, :ref:`Color<class_color>` custom_bg_color **)**
|
|
|
|
.. _class_ItemList_set_item_disabled:
|
|
|
|
- void **set_item_disabled** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)**
|
|
|
|
Disable (or enable) item at specified index.
|
|
|
|
Disabled items are not be selectable and do not fire activation (Enter or double-click) signals.
|
|
|
|
.. _class_ItemList_set_item_icon:
|
|
|
|
- void **set_item_icon** **(** :ref:`int<class_int>` idx, :ref:`Texture<class_texture>` icon **)**
|
|
|
|
Set (or replace) icon of the item at the specified index.
|
|
|
|
.. _class_ItemList_set_item_icon_region:
|
|
|
|
- void **set_item_icon_region** **(** :ref:`int<class_int>` idx, :ref:`Rect2<class_rect2>` rect **)**
|
|
|
|
.. _class_ItemList_set_item_metadata:
|
|
|
|
- void **set_item_metadata** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_variant>` metadata **)**
|
|
|
|
Sets a value (of any type) to be stored with the item at the specified index.
|
|
|
|
.. _class_ItemList_set_item_selectable:
|
|
|
|
- void **set_item_selectable** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` selectable **)**
|
|
|
|
Allow or disallow selection of the item at the specified index.
|
|
|
|
.. _class_ItemList_set_item_text:
|
|
|
|
- void **set_item_text** **(** :ref:`int<class_int>` idx, :ref:`String<class_string>` text **)**
|
|
|
|
Sets text of item at specified index.
|
|
|
|
.. _class_ItemList_set_item_tooltip:
|
|
|
|
- void **set_item_tooltip** **(** :ref:`int<class_int>` idx, :ref:`String<class_string>` tooltip **)**
|
|
|
|
Sets tooltip hint for item at specified index.
|
|
|
|
.. _class_ItemList_set_item_tooltip_enabled:
|
|
|
|
- void **set_item_tooltip_enabled** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enable **)**
|
|
|
|
Sets whether the tooltip is enabled for specified item index.
|
|
|
|
.. _class_ItemList_set_max_columns:
|
|
|
|
- void **set_max_columns** **(** :ref:`int<class_int>` amount **)**
|
|
|
|
Set maximum number of columns to use for the list.
|
|
|
|
.. _class_ItemList_set_max_text_lines:
|
|
|
|
- void **set_max_text_lines** **(** :ref:`int<class_int>` lines **)**
|
|
|
|
Set maximum number of lines to use for the list.
|
|
|
|
.. _class_ItemList_set_same_column_width:
|
|
|
|
- void **set_same_column_width** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Sets a fixed size (width) to use for all columns of the list.
|
|
|
|
.. _class_ItemList_set_select_mode:
|
|
|
|
- void **set_select_mode** **(** :ref:`int<class_int>` mode **)**
|
|
|
|
.. _class_ItemList_sort_items_by_text:
|
|
|
|
- void **sort_items_by_text** **(** **)**
|
|
|
|
Sorts items in the list by their text.
|
|
|
|
.. _class_ItemList_unselect:
|
|
|
|
- void **unselect** **(** :ref:`int<class_int>` idx **)**
|
|
|
|
Ensure item at specified index is not selected.
|
|
|
|
|