reckfellENGINE

ItemList

Record list with text, icons and single or multiple selection.

On this page
class ItemListReckfellSharpInherits Control

ItemList stores records rather than separate child Controls for every row. AddItem/AddIconItem return the new record’s current index. Adding does not automatically select it. ItemCount includes all records, including disabled and nonselectable ones.

An index is a position in 0…ItemCount-1 rather than a stable ID. MoveItem, RemoveItem and SortItemsByText change positions. Store your own key with SetItemMetadata; resolve its current index by iterating GetItemMetadata after mutations. Do not treat names or translated text as unique IDs. Metadata Array/Dictionary values can be shared containers.

Select(index) defaults to single = true: it replaces the entire selection even in Multi mode. Accumulate with Select(index, false) while SelectMode = Multi or Toggle. Programmatic Select rejects disabled/nonselectable targets. However, disabling an already selected record or clearing its Selectable flag does not deselect it; call Deselect when needed.

Select, Deselect, DeselectAll and structural operations do not emit user-facing ItemSelected/MultiSelected. Explicitly refresh dependent panels after code-driven changes rather than waiting for a signal. ItemClicked reports input, while ItemActivated reports activation, usually double click or ui_accept; neither is equivalent to a selection change.

Changing Multi/Toggle → Single does not normalize selected flags. GetSelectedItems in Single returns only the first even when IsSelected remains true for others. To switch modes, retain the desired ID, call DeselectAll, set the mode and explicitly select the desired record. GetSelectedItems returns a new index array in list order; editing it does not change selection.

Save selected record IDs before removal/sorting. After rebuilding, reset selection with DeselectAll, resolve indices again and restore using Select. This also avoids stale internal current indices being used for keyboard navigation/scrolling. SetItemCount shrinks by discarding the tail without a selection notification.

SortItemsByText compares original strings rather than localized display or a custom natural order. For your own order, sort the model and rebuild the list. GetItemText returns original text; SetItemLanguage controls shaping, SetItemAutoTranslateMode controls per-record translation. Neither rewrites the original string.

SetItemText and the reviewed SetItem* methods accept negative indices from the end (-1 is last). This is not a general rule for getters, Select, RemoveItem or MoveItem: use ordinary valid indices there. Configure tooltips with SetItemTooltip; disabling SetItemTooltipEnabled retains the string while preventing display.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

ItemListConstructor
# ItemList
C#
public ItemList();

Creates an empty list: Single, no selection, AllowReselect/AllowRmbSelect off, AllowSearch on.

Properties18

AllowReselectProperty
# AllowReselect
C#
public bool AllowReselect { get; set; }

Allows repeated user single-selection notification, default false. Does not make direct Select emit ItemSelected.

AllowRmbSelectProperty
# AllowRmbSelect
C#
public bool AllowRmbSelect { get; set; }

Allows right-button selection, default false. Does not create a context menu or restrict programmatic Select.

AllowSearchProperty
# AllowSearch
C#
public bool AllowSearch { get; set; }

Allows incremental typed search in the focused list, default true. Does not filter the model or add a search field.

AutoHeightProperty
# AutoHeight
C#
public bool AutoHeight { get; set; }

Use content height as minimum height, default false. Not automatic scrolling to the last item; depends on columns and is calculated during layout refresh.

AutoWidthProperty
# AutoWidth
C#
public bool AutoWidth { get; set; }

Use content width as Control minimum width, default false. After recalculation can expand the parent container and bypass ordinary width-fitting of columns. Leave false for a bounded list.

FixedColumnWidthProperty
# FixedColumnWidth
C#
public int FixedColumnWidth { get; set; }

Configured column/text width in local pixels, default 0 uses content width. Requires ≥ 0. For text wrapping use positive width with IconMode.Top and MaxTextLines; theme item spacing contributes separately.

FixedIconSizeProperty
# FixedIconSize
C#
public Vector2I FixedIconSize { get; set; }

Fixed icon slot; default Vector2I.Zero uses source-region size. Applies when both components are positive; slot is multiplied by IconScale and drawing fits preserving aspect. Does not modify the resource.

IconModeProperty
# IconMode
C#
public ItemList.IconModeEnum IconMode { get; set; }

Main icon Left by default or Top. Top permits a wrapped label under bounded width; does not change original text or icon pixels.

IconScaleProperty
# IconScale
C#
public float IconScale { get; set; }

Icon drawing/layout size multiplier, default 1. Must be finite; use a positive value for normal display. Also scales FixedIconSize without modifying Texture2D.

ItemCountProperty
# ItemCount
C#
public int ItemCount { get; set; }

Record count, default 0. Setter requires ≥ 0: new records are empty, selectable and unselected; shrinking discards the tail without selection signals. Reset/restore selection explicitly after structural changes.

MaxColumnsProperty
# MaxColumns
C#
public int MaxColumns { get; set; }

Column-count upper bound, default 1. 0 means no configured cap rather than zero columns. Wrapping can reduce actual count to fit available width. Requires ≥ 0.

MaxTextLinesProperty
# MaxTextLines
C#
public int MaxTextLines { get; set; }

Maximum label lines, default 1; requires ≥ 1. Wrapping applies in IconMode.Top and requires bounded width, such as FixedColumnWidth. Increasing it in Left does not enable multiline layout.

SameColumnWidthProperty
# SameColumnWidth
C#
public bool SameColumnWidth { get; set; }

Equalizes widths using the widest item, default false. Does not fix column count or itself constrain text width.

ScrollHintModeProperty
# ScrollHintMode
C#
public ItemList.ScrollHintModeEnum ScrollHintMode { get; set; }

Decorative vertical-scroll hint: default Disabled, Both/Top/Bottom. Uses the theme scroll_hint and current range; does not enable scrolling or replace ScrollBar.

SelectModeProperty
# SelectMode
C#
public ItemList.SelectModeEnum SelectMode { get; set; }

Selection mode, default Single, Multi or Toggle. Toggle switches selection by clicking without Ctrl. Setter does not normalize existing selected flags; for Multi/Toggle → Single call DeselectAll first and restore the desired record.

TextOverrunBehaviorProperty
# TextOverrunBehavior
C#
public TextServer.OverrunBehavior TextOverrunBehavior { get; set; }

Text trimming/ellipsis under bounded width, default TrimEllipsis. Does not itself set width or enable wrapping; coordinate with FixedColumnWidth, MaxTextLines and IconMode.

TileScrollHintProperty
# TileScrollHint
C#
public bool TileScrollHint { get; set; }

Tile the scroll_hint texture instead of stretching, default false. Relevant when ScrollHintMode is enabled and more content exists above/below.

WraparoundItemsProperty
# WraparoundItems
C#
public bool WraparoundItems { get; set; }

Wrap items into following rows to fit width, default true. This is layout rather than cyclic keyboard selection. false allows horizontal overflow; MaxColumns still limits row length.

Methods85

AddIconItemint
# AddIconItem
C#
public int AddIconItem(Texture2D icon, bool selectable = true);

Adds a record with a shared icon and empty text, returning its index. selectable controls selection eligibility; adding does not select it.

Parameters
NameTypeDefault
iconTexture2D—
selectablebooltrue
icon

Adds a record with a shared icon and empty text, returning its index. selectable controls selection eligibility; adding does not select it.

selectable

Adds a record with a shared icon and empty text, returning its index. selectable controls selection eligibility; adding does not select it.

Returns int

New current icon-record index.

AddItemint
# AddItem
C#
public int AddItem(string text, Texture2D icon = null, bool selectable = true);

Appends text, an optional shared icon and selectable flag; returns the new index. Does not automatically change selection or emit ItemSelected.

Parameters
NameTypeDefault
textstring—
iconTexture2Dnull
selectablebooltrue
text

Appends text, an optional shared icon and selectable flag; returns the new index. Does not automatically change selection or emit ItemSelected.

icon

Appends text, an optional shared icon and selectable flag; returns the new index. Does not automatically change selection or emit ItemSelected.

selectable

Appends text, an optional shared icon and selectable flag; returns the new index. Does not automatically change selection or emit ItemSelected.

Returns int

New current record index.

CenterOnCurrentvoid
# CenterOnCurrent
C#
public void CenterOnCurrent(bool centerVerically = true, bool centerHorizontally = true);

Centers the internal current item on requested axes through ScrollBar.Value. Refresh layout first; at least one flag must be true. Does nothing without a valid current; range bounds limit centering near edges.

Parameters
NameTypeDefault
centerVericallybooltrue
centerHorizontallybooltrue
centerVerically

Center vertically; the SDK parameter spelling is preserved.

centerHorizontally

Center horizontally; at least one axis must be enabled.

Clearvoid
# Clear
C#
public void Clear();

Removes all records and resets selection/internal current index. Does not emit ItemSelected/MultiSelected; explicitly refresh dependent panels.

Deselectvoid
# Deselect
C#
public void Deselect(int idx);

Clears the specified record’s selected flag without selection signals. In Single also resets the internal current index, so pass the actual selected record; use DeselectAll for a full reset.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

DeselectAllvoid
# DeselectAll
C#
public void DeselectAll();

Clears all selected flags and resets internal current index without ItemSelected/MultiSelected. Useful before mode changes or restoring selection after rebuilding.

EnsureCurrentIsVisiblevoid
# EnsureCurrentIsVisible
C#
public void EnsureCurrentIsVisible();

Requests deferred reveal of the internal current item during drawing rather than every selected Multi/Toggle record. Does not change selection. Establish size/records and a current item with single Select first; restore selection after structural changes.

ForceUpdateListSizevoid
# ForceUpdateListSize
C#
public void ForceUpdateListSize();

Recalculates list geometry, scroll ranges and auto minimums immediately when layout is dirty. Call after populating/resizing before GetItemRect/geometry queries. Not a forced full redraw or reset of every cache.

GetAllowReselectbool
# GetAllowReselect
C#
public bool GetAllowReselect();

Allows repeated user single-selection notification, default false. Does not make direct Select emit ItemSelected.

Returns bool

Repeated selection-notification flag.

GetAllowRmbSelectbool
# GetAllowRmbSelect
C#
public bool GetAllowRmbSelect();

Allows right-button selection, default false. Does not create a context menu or restrict programmatic Select.

Returns bool

Right-button selection flag.

GetAllowSearchbool
# GetAllowSearch
C#
public bool GetAllowSearch();

Allows incremental typed search in the focused list, default true. Does not filter the model or add a search field.

Returns bool

Incremental typed-search flag.

GetFixedColumnWidthint
# GetFixedColumnWidth
C#
public int GetFixedColumnWidth();

Configured column/text width in local pixels, default 0 uses content width. Requires ≥ 0. For text wrapping use positive width with IconMode.Top and MaxTextLines; theme item spacing contributes separately.

Returns int

Configured pixel width, 0 for content-based.

GetFixedIconSizeVector2I
# GetFixedIconSize
C#
public Vector2I GetFixedIconSize();

Fixed icon slot; default Vector2I.Zero uses source-region size. Applies when both components are positive; slot is multiplied by IconScale and drawing fits preserving aspect. Does not modify the resource.

Returns Vector2I

Configured Vector2I slot before IconScale.

GetHScrollBarHScrollBar
# GetHScrollBar
C#
public HScrollBar GetHScrollBar();

Shared internal HScrollBar. Do not free/remove it; horizontal overflow is associated with WraparoundItems = false. RTL direction/range can differ from LTR.

Returns HScrollBar

Shared internal HScrollBar.

GetIconModeItemList.IconModeEnum
# GetIconMode
C#
public ItemList.IconModeEnum GetIconMode();

Main icon Left by default or Top. Top permits a wrapped label under bounded width; does not change original text or icon pixels.

Returns ItemList.IconModeEnum

IconModeEnum.Top or Left.

GetIconScalefloat
# GetIconScale
C#
public float GetIconScale();

Icon drawing/layout size multiplier, default 1. Must be finite; use a positive value for normal display. Also scales FixedIconSize without modifying Texture2D.

Returns float

Stored icon sizing multiplier.

GetItemAtPositionint
# GetItemAtPosition
C#
public int GetItemAtPosition(Vector2 position, bool exact = false);

Queries an ItemList-local position, accounting for margins, scrolling and RTL. exact = true requires a hit; false can return the nearest record outside it. The last column can have an extended hit area. Disabled/nonselectable records can match; check flags separately.

Parameters
NameTypeDefault
positionVector2—
exactboolfalse
position

Point in ItemList control-local coordinates.

exact

true for hits only; false permits nearest items outside their area.

Returns int

Matched/nearest record index, or -1.

GetItemAutoTranslateModeEntity.AutoTranslateModeEnum
# GetItemAutoTranslateMode
C#
public Entity.AutoTranslateModeEnum GetItemAutoTranslateMode(int idx);

Stored per-record translation mode.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns Entity.AutoTranslateModeEnum

Record AutoTranslateModeEnum.

GetItemCountint
# GetItemCount
C#
public int GetItemCount();

Record count, default 0. Setter requires ≥ 0: new records are empty, selectable and unselected; shrinking discards the tail without selection signals. Reset/restore selection explicitly after structural changes.

Returns int

Record count.

GetItemCustomBgColorColor
# GetItemCustomBgColor
C#
public Color GetItemCustomBgColor(int idx);

Stored custom background color/alpha.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

Returns Color

Background color/alpha.

GetItemCustomFgColorColor
# GetItemCustomFgColor
C#
public Color GetItemCustomFgColor(int idx);

Stored text color; (0, 0, 0, 1) means use the theme rather than necessarily draw black.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

Returns Color

Text color, or sentinel (0, 0, 0, 1).

GetItemIconTexture2D
# GetItemIcon
C#
public Texture2D GetItemIcon(int idx);

Shared icon Texture2D, or null; source dimensions need not equal the drawing slot.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

Returns Texture2D

Shared Texture2D, or null.

GetItemIconModulateColor
# GetItemIconModulate
C#
public Color GetItemIconModulate(int idx);

Stored icon color/alpha multiplier.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

Returns Color

Icon color/alpha multiplier.

GetItemIconRegionRect2
# GetItemIconRegion
C#
public Rect2 GetItemIconRegion(int idx);

Stored source Rect2 rather than final screen area.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

Returns Rect2

Stored source-region Rect2.

GetItemLanguagestring
# GetItemLanguage
C#
public string GetItemLanguage(int idx);

Stored shaping language, or empty for the control locale.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns string

Shaping language code, or empty.

GetItemMetadataVariant
# GetItemMetadata
C#
public Variant GetItemMetadata(int idx);

Returns metadata Variant, Nil when unassigned. Use an expected ID type and an ordinary valid index; nested containers can remain shared.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns Variant

Metadata Variant, or Nil.

GetItemRectRect2
# GetItemRect
C#
public Rect2 GetItemRect(int idx, bool expand = true);

Cached item rectangle in content coordinates with panel margins, without subtracting scroll or applying screen transforms. In RTL also do not treat it as a ready screen rectangle. expand can extend the last column. Call ForceUpdateListSize after changes before reading.

Parameters
NameTypeDefault
idxint—
expandbooltrue
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

expand

Extend the last-column rectangle to available width.

Returns Rect2

Cached content Rect2 with margins, without scrolling.

GetItemTextstring
# GetItemText
C#
public string GetItemText(int idx);

Returns the original string rather than translated display.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns string

Original record string.

GetItemTextDirectionControl.TextDirection
# GetItemTextDirection
C#
public Control.TextDirection GetItemTextDirection(int idx);

Stored text direction, default Inherited.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns Control.TextDirection

Record Control.TextDirection.

GetItemTooltipstring
# GetItemTooltip
C#
public string GetItemTooltip(int idx);

Returns the assigned tooltip string even when display is disabled.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns string

Stored tooltip string.

GetMaxColumnsint
# GetMaxColumns
C#
public int GetMaxColumns();

Column-count upper bound, default 1. 0 means no configured cap rather than zero columns. Wrapping can reduce actual count to fit available width. Requires ≥ 0.

Returns int

Column-count cap, 0 for uncapped.

GetMaxTextLinesint
# GetMaxTextLines
C#
public int GetMaxTextLines();

Maximum label lines, default 1; requires ≥ 1. Wrapping applies in IconMode.Top and requires bounded width, such as FixedColumnWidth. Increasing it in Left does not enable multiline layout.

Returns int

Label line limit, ≥ 1.

GetScrollHintModeItemList.ScrollHintModeEnum
# GetScrollHintMode
C#
public ItemList.ScrollHintModeEnum GetScrollHintMode();

Decorative vertical-scroll hint: default Disabled, Both/Top/Bottom. Uses the theme scroll_hint and current range; does not enable scrolling or replace ScrollBar.

Returns ItemList.ScrollHintModeEnum

Current ScrollHintModeEnum.

GetSelectModeItemList.SelectModeEnum
# GetSelectMode
C#
public ItemList.SelectModeEnum GetSelectMode();

Selection mode, default Single, Multi or Toggle. Toggle switches selection by clicking without Ctrl. Setter does not normalize existing selected flags; for Multi/Toggle → Single call DeselectAll first and restore the desired record.

Returns ItemList.SelectModeEnum

Current SelectModeEnum.

GetSelectedItemsint[]
# GetSelectedItems
C#
public int[] GetSelectedItems();

New array of selected indices in list order. In Single stops at the first flag even if others remain after a mode change. Editing the array does not mutate the list.

Returns int[]

New int[] of selected indices in list order.

GetTextOverrunBehaviorTextServer.OverrunBehavior
# GetTextOverrunBehavior
C#
public TextServer.OverrunBehavior GetTextOverrunBehavior();

Text trimming/ellipsis under bounded width, default TrimEllipsis. Does not itself set width or enable wrapping; coordinate with FixedColumnWidth, MaxTextLines and IconMode.

Returns TextServer.OverrunBehavior

Current OverrunBehavior.

GetVScrollBarVScrollBar
# GetVScrollBar
C#
public VScrollBar GetVScrollBar();

Shared internal VScrollBar owned by ItemList. Do not free/remove it. Scroll through Value; range/page/visibility are managed by list layout.

Returns VScrollBar

Shared internal VScrollBar.

HasAutoHeightbool
# HasAutoHeight
C#
public bool HasAutoHeight();

Use content height as minimum height, default false. Not automatic scrolling to the last item; depends on columns and is calculated during layout refresh.

Returns bool

Content-based minimum-height flag.

HasAutoWidthbool
# HasAutoWidth
C#
public bool HasAutoWidth();

Use content width as Control minimum width, default false. After recalculation can expand the parent container and bypass ordinary width-fitting of columns. Leave false for a bounded list.

Returns bool

Content-based minimum-width flag.

HasWraparoundItemsbool
# HasWraparoundItems
C#
public bool HasWraparoundItems();

Wrap items into following rows to fit width, default true. This is layout rather than cyclic keyboard selection. false allows horizontal overflow; MaxColumns still limits row length.

Returns bool

Width-based item wrapping flag.

IsAnythingSelectedbool
# IsAnythingSelected
C#
public bool IsAnythingSelected();

Checks for at least one selected flag. Disabled/nonselectable changes do not automatically clear a previously selected flag.

Returns bool

true when any selected flag exists.

IsItemDisabledbool
# IsItemDisabled
C#
public bool IsItemDisabled(int idx);

Disabled flag rather than selection state.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns bool

Record disabled flag.

IsItemIconTransposedbool
# IsItemIconTransposed
C#
public bool IsItemIconTransposed(int idx);

Icon-axis transpose flag.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

Returns bool

Axis-transpose flag.

IsItemSelectablebool
# IsItemSelectable
C#
public bool IsItemSelectable(int idx);

Selectable flag, separate from disabled and selected.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns bool

Record selectable flag.

IsItemTooltipEnabledbool
# IsItemTooltipEnabled
C#
public bool IsItemTooltipEnabled(int idx);

Tooltip permission flag rather than current visibility.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns bool

Tooltip permission flag.

IsSameColumnWidthbool
# IsSameColumnWidth
C#
public bool IsSameColumnWidth();

Equalizes widths using the widest item, default false. Does not fix column count or itself constrain text width.

Returns bool

Equal-width flag.

IsScrollHintTiledbool
# IsScrollHintTiled
C#
public bool IsScrollHintTiled();

Tile the scroll_hint texture instead of stretching, default false. Relevant when ScrollHintMode is enabled and more content exists above/below.

Returns bool

Hint-texture tiling flag.

IsSelectedbool
# IsSelected
C#
public bool IsSelected(int idx);

Returns a record’s selected flag. Can remain true for multiple records after Multi/Toggle → Single until explicitly normalized.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Returns bool

Record selected flag.

MoveItemvoid
# MoveItem
C#
public void MoveItem(int fromIdx, int toIdx);

Moves a complete record to final index toIdx; both indices are 0…ItemCount-1, use ItemCount - 1 for the end. Text, metadata and selected move together. No selection signals; explicitly restore current selection by ID after rebuilding.

Parameters
NameTypeDefault
fromIdxint—
toIdxint—
fromIdx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

toIdx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

RemoveItemvoid
# RemoveItem
C#
public void RemoveItem(int idx);

Removes a record and shifts later indices without selection signals. Remaining selected flags stay with their records; internal current index is not a reliable ID. Reset/restore selection after removal.

Parameters
NameTypeDefault
idxint—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

Selectvoid
# Select
C#
public void Select(int idx, bool single = true);

Selects an eligible selectable, non-disabled record without ItemSelected/MultiSelected. Default single = true replaces all selection; false accumulates in Multi or Toggle. In Single mode false still performs single selection.

Parameters
NameTypeDefault
idxint—
singlebooltrue
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

single

true replaces all selection; false accumulates in Multi or Toggle.

SetAllowReselectvoid
# SetAllowReselect
C#
public void SetAllowReselect(bool allow);

Allows repeated user single-selection notification, default false. Does not make direct Select emit ItemSelected.

Parameters
NameTypeDefault
allowbool—
allow

Allows repeated user single-selection notification, default false. Does not make direct Select emit ItemSelected.

SetAllowRmbSelectvoid
# SetAllowRmbSelect
C#
public void SetAllowRmbSelect(bool allow);

Allows right-button selection, default false. Does not create a context menu or restrict programmatic Select.

Parameters
NameTypeDefault
allowbool—
allow

Allows right-button selection, default false. Does not create a context menu or restrict programmatic Select.

SetAllowSearchvoid
# SetAllowSearch
C#
public void SetAllowSearch(bool allow);

Allows incremental typed search in the focused list, default true. Does not filter the model or add a search field.

Parameters
NameTypeDefault
allowbool—
allow

Allows incremental typed search in the focused list, default true. Does not filter the model or add a search field.

SetAutoHeightvoid
# SetAutoHeight
C#
public void SetAutoHeight(bool enable);

Use content height as minimum height, default false. Not automatic scrolling to the last item; depends on columns and is calculated during layout refresh.

Parameters
NameTypeDefault
enablebool—
enable

Use content height as minimum height, default false. Not automatic scrolling to the last item; depends on columns and is calculated during layout refresh.

SetAutoWidthvoid
# SetAutoWidth
C#
public void SetAutoWidth(bool enable);

Use content width as Control minimum width, default false. After recalculation can expand the parent container and bypass ordinary width-fitting of columns. Leave false for a bounded list.

Parameters
NameTypeDefault
enablebool—
enable

Use content width as Control minimum width, default false. After recalculation can expand the parent container and bypass ordinary width-fitting of columns. Leave false for a bounded list.

SetFixedColumnWidthvoid
# SetFixedColumnWidth
C#
public void SetFixedColumnWidth(int width);

Configured column/text width in local pixels, default 0 uses content width. Requires ≥ 0. For text wrapping use positive width with IconMode.Top and MaxTextLines; theme item spacing contributes separately.

Parameters
NameTypeDefault
widthint—
width

Configured column/text width in local pixels, default 0 uses content width. Requires ≥ 0. For text wrapping use positive width with IconMode.Top and MaxTextLines; theme item spacing contributes separately.

SetFixedIconSizevoid
# SetFixedIconSize
C#
public void SetFixedIconSize(Vector2I size);

Fixed icon slot; default Vector2I.Zero uses source-region size. Applies when both components are positive; slot is multiplied by IconScale and drawing fits preserving aspect. Does not modify the resource.

Parameters
NameTypeDefault
sizeVector2I—
size

Fixed icon slot; default Vector2I.Zero uses source-region size. Applies when both components are positive; slot is multiplied by IconScale and drawing fits preserving aspect. Does not modify the resource.

SetIconModevoid
# SetIconMode
C#
public void SetIconMode(ItemList.IconModeEnum mode);

Main icon Left by default or Top. Top permits a wrapped label under bounded width; does not change original text or icon pixels.

Parameters
NameTypeDefault
modeItemList.IconModeEnum—
mode

Main icon Left by default or Top. Top permits a wrapped label under bounded width; does not change original text or icon pixels.

SetIconScalevoid
# SetIconScale
C#
public void SetIconScale(float scale);

Icon drawing/layout size multiplier, default 1. Must be finite; use a positive value for normal display. Also scales FixedIconSize without modifying Texture2D.

Parameters
NameTypeDefault
scalefloat—
scale

Icon drawing/layout size multiplier, default 1. Must be finite; use a positive value for normal display. Also scales FixedIconSize without modifying Texture2D.

SetItemAutoTranslateModevoid
# SetItemAutoTranslateMode
C#
public void SetItemAutoTranslateMode(int idx, Entity.AutoTranslateModeEnum mode);

Record translation mode: Inherit uses control policy, Always requests translation, Disabled displays original text. Does not rewrite GetItemText. Supports negative indices.

Parameters
NameTypeDefault
idxint—
modeEntity.AutoTranslateModeEnum—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

mode

Record translation mode: Inherit uses control policy, Always requests translation, Disabled displays original text. Does not rewrite GetItemText. Supports negative indices.

SetItemCountvoid
# SetItemCount
C#
public void SetItemCount(int count);

Record count, default 0. Setter requires ≥ 0: new records are empty, selectable and unselected; shrinking discards the tail without selection signals. Reset/restore selection explicitly after structural changes.

Parameters
NameTypeDefault
countint—
count

Record count, default 0. Setter requires ≥ 0: new records are empty, selectable and unselected; shrinking discards the tail without selection signals. Reset/restore selection explicitly after structural changes.

SetItemCustomBgColorvoid
# SetItemCustomBgColor
C#
public void SetItemCustomBgColor(int idx, Color customBgColor);

Custom record background, default transparent black. Drawn when alpha > 0.001; separate from theme selected/hovered style colors. Supports negative indices.

Parameters
NameTypeDefault
idxint—
customBgColorColor—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

customBgColor

Custom record background, default transparent black. Drawn when alpha > 0.001; separate from theme selected/hovered style colors. Supports negative indices.

SetItemCustomFgColorvoid
# SetItemCustomFgColor
C#
public void SetItemCustomFgColor(int idx, Color customFgColor);

Overrides text color. new Color(0, 0, 0, 1) is the sentinel for theme text colors; do not confuse it with C# new Color(), whose alpha is 0. A custom color takes priority over theme selected/disabled text colors. Supports negative indices.

Parameters
NameTypeDefault
idxint—
customFgColorColor—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

customFgColor

Overrides text color. new Color(0, 0, 0, 1) is the sentinel for theme text colors; do not confuse it with C# new Color(), whose alpha is 0. A custom color takes priority over theme selected/disabled text colors. Supports negative indices.

SetItemDisabledvoid
# SetItemDisabled
C#
public void SetItemDisabled(int idx, bool disabled);

Changes the disabled flag: Select and user selection reject that target. A previously selected record retains selected. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
disabledbool—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

disabled

Changes the disabled flag: Select and user selection reject that target. A previously selected record retains selected. Supports negative indexing from the end.

SetItemIconvoid
# SetItemIcon
C#
public void SetItemIcon(int idx, Texture2D icon);

Assigns a shared Texture2D; null removes the icon. Marks layout dirty when the reference changes; does not copy the image. Internal resizing of the same resource does not guarantee geometry recalculation. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
iconTexture2D—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

icon

Assigns a shared Texture2D; null removes the icon. Marks layout dirty when the reference changes; does not copy the image. Internal resizing of the same resource does not guarantee geometry recalculation. Supports negative indexing from the end.

SetItemIconModulatevoid
# SetItemIconModulate
C#
public void SetItemIconModulate(int idx, Color modulate);

Icon color/alpha multiplier, default white. Does not change text color or Texture2D pixels. Supports negative indices.

Parameters
NameTypeDefault
idxint—
modulateColor—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

modulate

Icon color/alpha multiplier, default white. Does not change text color or Texture2D pixels. Supports negative indices.

SetItemIconRegionvoid
# SetItemIconRegion
C#
public void SetItemIconRegion(int idx, Rect2 rect);

Source-texture region in pixels. Zero width or height uses whole-texture dimensions. Supply a valid rectangle; affects natural slot size without physically cropping the resource. Supports negative indices.

Parameters
NameTypeDefault
idxint—
rectRect2—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

rect

Source-texture region in pixels. Zero width or height uses whole-texture dimensions. Supply a valid rectangle; affects natural slot size without physically cropping the resource. Supports negative indices.

SetItemIconTransposedvoid
# SetItemIconTransposed
C#
public void SetItemIconTransposed(int idx, bool transposed);

Transposes icon axes for drawing and natural sizing without editing texture data. Combines with IconRegion/FixedIconSize/IconScale. Supports negative indices.

Parameters
NameTypeDefault
idxint—
transposedbool—
idx

Index 0…ItemCount-1; SetItem* also accepts a negative index from the end.

transposed

Transposes icon axes for drawing and natural sizing without editing texture data. Combines with IconRegion/FixedIconSize/IconScale. Supports negative indices.

SetItemLanguagevoid
# SetItemLanguage
C#
public void SetItemLanguage(int idx, string language);

Record shaping language; empty uses the control locale. Does not translate original Text. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
languagestring—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

language

Record shaping language; empty uses the control locale. Does not translate original Text. Supports negative indexing from the end.

SetItemMetadatavoid
# SetItemMetadata
C#
public void SetItemMetadata(int idx, Variant metadata);

Sets record Variant data, such as a stable ID. Array/Dictionary can remain shared; this is not a deep copy. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
metadataVariant—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

metadata

Sets record Variant data, such as a stable ID. Array/Dictionary can remain shared; this is not a deep copy. Supports negative indexing from the end.

SetItemSelectablevoid
# SetItemSelectable
C#
public void SetItemSelectable(int idx, bool selectable);

Allows/disallows future record selection. Does not clear an existing selection; call Deselect separately when needed. Supports a negative index from the end.

Parameters
NameTypeDefault
idxint—
selectablebool—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

selectable

Allows/disallows future record selection. Does not clear an existing selection; call Deselect separately when needed. Supports a negative index from the end.

SetItemTextvoid
# SetItemText
C#
public void SetItemText(int idx, string text);

Changes original text and refreshes translation/shaping. Does not rewrite index or metadata. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
textstring—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

text

Changes original text and refreshes translation/shaping. Does not rewrite index or metadata. Supports negative indexing from the end.

SetItemTextDirectionvoid
# SetItemTextDirection
C#
public void SetItemTextDirection(int idx, Control.TextDirection direction);

Record shaping direction; Inherited uses layout direction. Does not reverse the original string. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
directionControl.TextDirection—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

direction

Record shaping direction; Inherited uses layout direction. Does not reverse the original string. Supports negative indexing from the end.

SetItemTooltipvoid
# SetItemTooltip
C#
public void SetItemTooltip(int idx, string tooltip);

Sets a separate tooltip string without changing record text. Supports negative indexing from the end. Use SetItemTooltipEnabled to prevent display.

Parameters
NameTypeDefault
idxint—
tooltipstring—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

tooltip

Sets a separate tooltip string without changing record text. Supports negative indexing from the end. Use SetItemTooltipEnabled to prevent display.

SetItemTooltipEnabledvoid
# SetItemTooltipEnabled
C#
public void SetItemTooltipEnabled(int idx, bool enable);

Allows tooltip display, default true. Disabling does not clear the stored tooltip. Supports negative indexing from the end.

Parameters
NameTypeDefault
idxint—
enablebool—
idx

Index 0…ItemCount-1; only the reviewed SetItem* methods accept negative indexing from the end.

enable

Allows tooltip display, default true. Disabling does not clear the stored tooltip. Supports negative indexing from the end.

SetMaxColumnsvoid
# SetMaxColumns
C#
public void SetMaxColumns(int amount);

Column-count upper bound, default 1. 0 means no configured cap rather than zero columns. Wrapping can reduce actual count to fit available width. Requires ≥ 0.

Parameters
NameTypeDefault
amountint—
amount

Column-count upper bound, default 1. 0 means no configured cap rather than zero columns. Wrapping can reduce actual count to fit available width. Requires ≥ 0.

SetMaxTextLinesvoid
# SetMaxTextLines
C#
public void SetMaxTextLines(int lines);

Maximum label lines, default 1; requires ≥ 1. Wrapping applies in IconMode.Top and requires bounded width, such as FixedColumnWidth. Increasing it in Left does not enable multiline layout.

Parameters
NameTypeDefault
linesint—
lines

Maximum label lines, default 1; requires ≥ 1. Wrapping applies in IconMode.Top and requires bounded width, such as FixedColumnWidth. Increasing it in Left does not enable multiline layout.

SetSameColumnWidthvoid
# SetSameColumnWidth
C#
public void SetSameColumnWidth(bool enable);

Equalizes widths using the widest item, default false. Does not fix column count or itself constrain text width.

Parameters
NameTypeDefault
enablebool—
enable

Equalizes widths using the widest item, default false. Does not fix column count or itself constrain text width.

SetScrollHintModevoid
# SetScrollHintMode
C#
public void SetScrollHintMode(ItemList.ScrollHintModeEnum scrollHintMode);

Decorative vertical-scroll hint: default Disabled, Both/Top/Bottom. Uses the theme scroll_hint and current range; does not enable scrolling or replace ScrollBar.

Parameters
NameTypeDefault
scrollHintModeItemList.ScrollHintModeEnum—
scrollHintMode

Decorative vertical-scroll hint: default Disabled, Both/Top/Bottom. Uses the theme scroll_hint and current range; does not enable scrolling or replace ScrollBar.

SetSelectModevoid
# SetSelectMode
C#
public void SetSelectMode(ItemList.SelectModeEnum mode);

Selection mode, default Single, Multi or Toggle. Toggle switches selection by clicking without Ctrl. Setter does not normalize existing selected flags; for Multi/Toggle → Single call DeselectAll first and restore the desired record.

Parameters
NameTypeDefault
modeItemList.SelectModeEnum—
mode

Selection mode, default Single, Multi or Toggle. Toggle switches selection by clicking without Ctrl. Setter does not normalize existing selected flags; for Multi/Toggle → Single call DeselectAll first and restore the desired record.

SetTextOverrunBehaviorvoid
# SetTextOverrunBehavior
C#
public void SetTextOverrunBehavior(TextServer.OverrunBehavior overrunBehavior);

Text trimming/ellipsis under bounded width, default TrimEllipsis. Does not itself set width or enable wrapping; coordinate with FixedColumnWidth, MaxTextLines and IconMode.

Parameters
NameTypeDefault
overrunBehaviorTextServer.OverrunBehavior—
overrunBehavior

Text trimming/ellipsis under bounded width, default TrimEllipsis. Does not itself set width or enable wrapping; coordinate with FixedColumnWidth, MaxTextLines and IconMode.

SetTileScrollHintvoid
# SetTileScrollHint
C#
public void SetTileScrollHint(bool tileScrollHint);

Tile the scroll_hint texture instead of stretching, default false. Relevant when ScrollHintMode is enabled and more content exists above/below.

Parameters
NameTypeDefault
tileScrollHintbool—
tileScrollHint

Tile the scroll_hint texture instead of stretching, default false. Relevant when ScrollHintMode is enabled and more content exists above/below.

SetWraparoundItemsvoid
# SetWraparoundItems
C#
public void SetWraparoundItems(bool enable);

Wrap items into following rows to fit width, default true. This is layout rather than cyclic keyboard selection. false allows horizontal overflow; MaxColumns still limits row length.

Parameters
NameTypeDefault
enablebool—
enable

Wrap items into following rows to fit width, default true. This is layout rather than cyclic keyboard selection. false allows horizontal overflow; MaxColumns still limits row length.

SortItemsByTextvoid
# SortItemsByText
C#
public void SortItemsByText();

Sorts records by original Text comparison rather than translation or locale-aware natural order. Selected/metadata move with records; do not assume stable ordering of equal strings. Does not emit selection signals.

Signals and events5

EmptyClickedEvent
# EmptyClicked
C#
public event ItemList.EmptyClickedEventHandler EmptyClicked;

Click on empty space. Does not itself promise deselection; call DeselectAll in the handler and refresh the panel when that behavior is desired.

Handler parameters
NameTypeDefault
atPositionVector2—
mouseButtonIndexlong—
atPosition

Input position in ItemList local coordinates.

mouseButtonIndex

Numeric mouse-button value.

ItemActivatedEvent
# ItemActivated
C#
public event ItemList.ItemActivatedEventHandler ItemActivated;

Record activation, usually double click or ui_accept. Not selection and not emitted by simple Select. Check application-model permission before opening/executing.

Handler parameters
NameTypeDefault
indexlong—
index

Record index at event time; read metadata for a stable ID.

ItemClickedEvent
# ItemClicked
C#
public event ItemList.ItemClickedEventHandler ItemClicked;

Record click action; selection may be unchanged. Supplies index, local position and mouse button. For a context menu inspect the button separately from AllowRmbSelect.

Handler parameters
NameTypeDefault
indexlong—
atPositionVector2—
mouseButtonIndexlong—
index

Record index at event time; read metadata for a stable ID.

atPosition

Input position in ItemList local coordinates.

mouseButtonIndex

Numeric mouse-button value.

ItemSelectedEvent
# ItemSelected
C#
public event ItemList.ItemSelectedEventHandler ItemSelected;

User selection notification in single mode. Direct Select/Deselect/list rebuilding do not emit it. Supplies a current index rather than stable ID.

Handler parameters
NameTypeDefault
indexlong—
index

Record index at event time; read metadata for a stable ID.

MultiSelectedEvent
# MultiSelected
C#
public event ItemList.MultiSelectedEventHandler MultiSelected;

User-input selected-flag change in multiple mode. Direct Select/Deselect do not emit it. Range selection can produce multiple events.

Handler parameters
NameTypeDefault
indexlong—
selectedbool—
index

Record index at event time; read metadata for a stable ID.

selected

New selected state of this record.

ItemList.IconModeEnum

ValueDescription
Left = 1

Icon is drawn to the left of the text.

Top = 0

Icon is drawn above the text.

ItemList.ScrollHintModeEnum

ValueDescription
Both = 1

Scroll hints will be shown at the top and bottom.

Bottom = 3

Only the bottom scroll hint will be shown.

Disabled = 0

Scroll hints will never be shown.

Top = 2

Only the top scroll hint will be shown.

ItemList.SelectModeEnum

ValueDescription
Multi = 1

Allows selecting multiple items by holding [kbd]Ctrl[/kbd] or [kbd]Shift[/kbd].

Single = 0

Only allow selecting a single item.

Toggle = 2

Allows selecting multiple items by toggling them on and off.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
font_color
Color

Default text Color of the item.

Default: Color(0.65, 0.65, 0.65, 1)
font_disabled_color
Color

Text Color used when the item is disabled.

Default: Color(0.875, 0.875, 0.875, 0.5)
font_disabled_hovered_color
Color

Text Color used when the item is disabled and hovered.

Default: Color(0.875, 0.875, 0.875, 0.5)
font_hovered_color
Color

Text Color used when the item is hovered and not selected yet.

Default: Color(0.95, 0.95, 0.95, 1)
font_hovered_selected_color
Color

Text Color used when the item is hovered and selected.

Default: Color(1, 1, 1, 1)
font_outline_color
Color

The tint of text outline of the item.

Default: Color(0, 0, 0, 1)
font_selected_color
Color

Text Color used when the item is selected, but not hovered.

Default: Color(1, 1, 1, 1)
guide_color
Color

Color of the guideline. The guideline is a line drawn between each row of items.

Default: Color(0.7, 0.7, 0.7, 0.25)
scroll_hint_color
Color

Color used to modulate the ItemList.scroll_hint texture.

Default: Color(0, 0, 0, 1)
h_separation
int

The horizontal spacing between items.

Default: 4
icon_margin
int

The spacing between item's icon and text.

Default: 4
line_separation
int

The vertical spacing between each line of text.

Default: 2
outline_size
int

The size of the item text outline. Note: If using a font with FontFile.MultichannelSignedDistanceField enabled, its FontFile.MsdfPixelRange must be set to at least twice the value of ItemList.outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.

Default: 0
scrollbar_h_separation
int

The horizontal separation of items and the vertical scrollbar.

Default: 4
scrollbar_margin_bottom
int

The bottom margin of the horizontal scrollbar. When negative, uses ItemList.panel's bottom margin.

Default: -1
scrollbar_margin_left
int

The left margin of the horizontal scrollbar. When negative, uses ItemList.panel's left margin.

Default: -1
scrollbar_margin_right
int

The right margin of the horizontal scrollbar. When negative, uses ItemList.panel's right margin.

Default: -1
scrollbar_margin_top
int

The top margin of the horizontal scrollbar. When negative, uses ItemList.panel's top margin.

Default: -1
v_separation
int

The vertical spacing between items.

Default: 4
font
Font

Font of the item's text.

font_size
int

Font size of the item's text.

scroll_hint
Texture2D

The indicator that will be shown when the content can still be scrolled. See ItemList.ScrollHintMode.

focus_sound
AudioStream

Played when this ItemList receives keyboard or gamepad-induced focus. Mouse or touch-induced focus does not play a focus sound.

item_hovered_sound
AudioStream

Played when an item is hovered. Disabled items do not play a hover sound.

item_selected_disabled_sound
AudioStream

Played when selecting a disabled item is attempted.

item_selected_sound
AudioStream

Played when an item is selected.

cursor
StyleBox

StyleBox used for the cursor, when the ItemList is being focused.

cursor_unfocused
StyleBox

StyleBox used for the cursor, when the ItemList is not being focused.

disabled
StyleBox

StyleBox for items that are disabled.

disabled_hovered
StyleBox

StyleBox for items that are disabled, hovered, but not selected.

focus
StyleBox

The focused style for the ItemList, drawn on top of everything.

hovered
StyleBox

StyleBox for the hovered, but not selected items.

hovered_selected
StyleBox

StyleBox for the hovered and selected items, used when the ItemList is not being focused.

hovered_selected_focus
StyleBox

StyleBox for the hovered and selected items, used when the ItemList is being focused.

panel
StyleBox

The background style for the ItemList.

selected
StyleBox

StyleBox for the selected items, used when the ItemList is not being focused.

selected_focus
StyleBox

StyleBox for the selected items, used when the ItemList is being focused.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.