reckfellENGINE

TabBar

Standalone tab strip: records and selection without page management.

On this page
class TabBarReckfellSharpInherits Control

TabBar draws headers and stores tab records. It does not turn child Controls into pages or manage their Visible state. Use TabContainer for ready-made page management. For a custom switcher, associate tabs with your model/page through metadata and explicitly refresh the UI.

AddTab adds a title and optional icon. SetTabCount changes record count: new records have empty titles, shrinking discards the tail. This does not create/remove Entities. Indices 0…TabCount-1 include hidden/disabled tabs and change with MoveTab/RemoveTab. Use your own metadata ID instead of persisting an index. MoveTab(from, to) takes a final index in the existing list; to = TabCount does not append, use TabCount - 1.

CurrentTab = -1 means no selection. DeselectEnabled permits this even with available tabs. Direct CurrentTab assignment accepts disabled/hidden records; user input and SelectNextAvailable/SelectPreviousAvailable skip them. Navigation does not wrap; next from -1 starts at the first available tab, previous from -1 returns false.

Notifications depend on the operation. CurrentTab emits TabSelected, then TabChanged on change; repeating an index emits only TabSelected. MoveTab reorders the record and adjusts current/previous without those signals. Removing before the current tab shifts its index without TabChanged; removing the current record emits TabChanged without TabSelected. SetTabCount and ClearTabs write state directly and normally do not notify selection. Explicitly synchronize your page/model after structural changes.

The first AddTab in the tree selects and notifies when DeselectEnabled is off. Construction outside the tree can establish selection without signals. The first SetTabCount can apply an earlier queued CurrentTab and then notify; do not build initialization solely around expecting a signal. Populate records, set selection, then explicitly refresh dependent UI once.

SetTabHidden hides the header but does not automatically deselect it in standalone TabBar. SetTabDisabled also does not switch away from an already selected tab. Enforce your selection rules in code if showing a disabled page is forbidden.

TabClosePressed is a close request rather than deletion. Check unsaved changes, remove your page/model and call RemoveTab if closing is allowed. TabButtonPressed belongs to a separate icon button; TabClicked/TabRmbClicked represent user input. Programmatic selection is not a click.

Metadata holds a Variant: numbers/strings work well as stable keys, while Array/Dictionary can remain shared reference containers. GetTabTitle returns the original title even when display is translated. SetTabLanguage controls shaping rather than application locale or stored text.

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

Constructors1

TabBarConstructor
# TabBar
C#
public TabBar();

Creates an empty strip: TabCount = 0, CurrentTab = PreviousTab = -1, DeselectEnabled = false. Child Controls do not automatically become pages.

Properties15

ClipTabsProperty
# ClipTabs
C#
public bool ClipTabs { get; set; }

Constrain the strip to available width, default true. Overflow uses navigation buttons and an index offset. false includes header widths in minimum size and resets the offset; not child ClipContents.

CloseWithMiddleMouseProperty
# CloseWithMiddleMouse
C#
public bool CloseWithMiddleMouse { get; set; }

Allows a middle-button close request, default true. Does not automatically remove records or control close-button visibility.

CurrentTabProperty
# CurrentTab
C#
public int CurrentTab { get; set; }

Selected index, -1 for none. Direct setter accepts hidden/disabled; -1 requires DeselectEnabled or no available records. Emits TabSelected even for the same index, TabChanged only on change. An initial request before initialization can be queued.

DeselectEnabledProperty
# DeselectEnabled
C#
public bool DeselectEnabled { get; set; }

Allows selection -1 with available tabs, default false. Disabling without selection attempts to choose the next available tab from the start.

DragToRearrangeEnabledProperty
# DragToRearrangeEnabled
C#
public bool DragToRearrangeEnabled { get; set; }

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveTab; cross-strip transfers additionally require matching TabsRearrangeGroup.

MaxTabWidthProperty
# MaxTabWidth
C#
public int MaxTabWidth { get; set; }

Pixel width limit used to shorten header text, default 0 disables the per-header limit. Requires ≥ 0. Icons, buttons and margins retain their minimum, so the complete header can exceed this value. Available layout maximum also contributes.

ScrollToSelectedProperty
# ScrollToSelected
C#
public bool ScrollToSelected { get; set; }

Automatically reveal the selected header, default true. Enabling immediately calls EnsureTabVisible for the current index. false retains selection without guaranteeing visibility; explicit EnsureTabVisible remains available.

ScrollingEnabledProperty
# ScrollingEnabled
C#
public bool ScrollingEnabled { get; set; }

Allows strip scrolling through wheel/touch input, default true. Does not block EnsureTabVisible or automatic CurrentTab reveal, or hide overflow buttons.

SelectWithRmbProperty
# SelectWithRmb
C#
public bool SelectWithRmb { get; set; }

Allows right-button selection, default false. TabRmbClicked and displaying your menu are separate actions; programmatic CurrentTab is not restricted by this flag.

SwitchOnDragHoverProperty
# SwitchOnDragHover
C#
public bool SwitchOnDragHover { get; set; }

Switches tabs after a hover delay while dragging content, default true. Does not make a drop acceptable. Dragging tabs themselves does not use this hover path.

TabAlignmentProperty
# TabAlignment
C#
public TabBar.AlignmentMode TabAlignment { get; set; }

Horizontal header alignment Left/Center/Right, default Left. Layout direction is handled separately; not alignment of your pages.

TabCloseDisplayPolicyProperty
# TabCloseDisplayPolicy
C#
public TabBar.CloseButtonDisplayPolicy TabCloseDisplayPolicy { get; set; }

Built-in close-button display: default ShowNever, ShowActiveOnly or ShowAlways. Activation emits TabClosePressed; the application handles removal.

TabCountProperty
# TabCount
C#
public int TabCount { get; set; }

Record count including hidden/disabled, default 0. Setter requires a value ≥ 0: grows empty tabs or removes the tail and clamps CurrentTab. Normally changes selection without signals; first application can execute queued CurrentTab.

TabSizingProperty
# TabSizing
C#
public TabBar.SizingMode TabSizing { get; set; }

Header sizing, default FitContent. Uniform uses the widest width; Justify proportionally expands widths when space is available; Expand uses equal widths if the widest fits, otherwise falls back to FitContent. MaxTabWidth and available layout can further constrain text.

TabsRearrangeGroupProperty
# TabsRearrangeGroup
C#
public int TabsRearrangeGroup { get; set; }

Tab-transfer group between TabBars; default -1 disables cross-strip transfers. Use matching nonnegative IDs and DragToRearrangeEnabled on participants. Not an Entity group or stable tab ID.

Methods62

AddTabvoid
# AddTab
C#
public void AddTab(string title = "", Texture2D icon = null);

Appends a record with a title and optional shared icon. Selects it when first and DeselectEnabled is off; selection signals emit in the tree. Does not create a page.

Parameters
NameTypeDefault
titlestring""
iconTexture2Dnull
title

Appends a record with a title and optional shared icon. Selects it when first and DeselectEnabled is off; selection signals emit in the tree. Does not create a page.

icon

Appends a record with a title and optional shared icon. Selects it when first and DeselectEnabled is off; selection signals emit in the tree. Does not create a page.

ClearTabsvoid
# ClearTabs
C#
public void ClearTabs();

Removes all records and resets current/previous to -1 and offset to 0. Does not emit TabChanged/TabSelected or remove child Controls. Explicitly refresh your own page.

EnsureTabVisiblevoid
# EnsureTabVisible
C#
public void EnsureTabVisible(int idx);

Adjusts the scroll index for a header without changing CurrentTab. Works in the tree with overflow buttons visible, independently of ScrollingEnabled. Does nothing for -1, hidden or already-in-window indices. Does not promise full display of a header wider than the strip.

Parameters
NameTypeDefault
idxint—
idx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

GetClipTabsbool
# GetClipTabs
C#
public bool GetClipTabs();

Constrain the strip to available width, default true. Overflow uses navigation buttons and an index offset. false includes header widths in minimum size and resets the offset; not child ClipContents.

Returns bool

Strip-width constraint flag.

GetCloseWithMiddleMousebool
# GetCloseWithMiddleMouse
C#
public bool GetCloseWithMiddleMouse();

Allows a middle-button close request, default true. Does not automatically remove records or control close-button visibility.

Returns bool

Middle-button close flag.

GetCurrentTabint
# GetCurrentTab
C#
public int GetCurrentTab();

Selected index, -1 for none. Direct setter accepts hidden/disabled; -1 requires DeselectEnabled or no available records. Emits TabSelected even for the same index, TabChanged only on change. An initial request before initialization can be queued.

Returns int

Current record index, or -1.

GetDeselectEnabledbool
# GetDeselectEnabled
C#
public bool GetDeselectEnabled();

Allows selection -1 with available tabs, default false. Disabling without selection attempts to choose the next available tab from the start.

Returns bool

Whether explicit deselection is allowed.

GetDragToRearrangeEnabledbool
# GetDragToRearrangeEnabled
C#
public bool GetDragToRearrangeEnabled();

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveTab; cross-strip transfers additionally require matching TabsRearrangeGroup.

Returns bool

User drag-to-reorder flag.

GetMaxTabWidthint
# GetMaxTabWidth
C#
public int GetMaxTabWidth();

Pixel width limit used to shorten header text, default 0 disables the per-header limit. Requires ≥ 0. Icons, buttons and margins retain their minimum, so the complete header can exceed this value. Available layout maximum also contributes.

Returns int

Header-text width limit in pixels, 0 for none.

GetOffsetButtonsVisiblebool
# GetOffsetButtonsVisible
C#
public bool GetOffsetButtonsVisible();

Whether overflow buttons are displayed after geometry calculation. Not the ScrollingEnabled setting or proof that the selected tab is visible.

Returns bool

Overflow-button visibility from current layout.

GetPreviousTabint
# GetPreviousTab
C#
public int GetPreviousTab();

Index before the last selection assignment, adjusted by reorder/removal. Reselection makes previous equal current; not necessarily the last different tab.

Returns int

Previous index adjusted for structural changes.

GetScrollToSelectedbool
# GetScrollToSelected
C#
public bool GetScrollToSelected();

Automatically reveal the selected header, default true. Enabling immediately calls EnsureTabVisible for the current index. false retains selection without guaranteeing visibility; explicit EnsureTabVisible remains available.

Returns bool

Automatic selection-reveal flag.

GetScrollingEnabledbool
# GetScrollingEnabled
C#
public bool GetScrollingEnabled();

Allows strip scrolling through wheel/touch input, default true. Does not block EnsureTabVisible or automatic CurrentTab reveal, or hide overflow buttons.

Returns bool

User-input scrolling flag.

GetSelectWithRmbbool
# GetSelectWithRmb
C#
public bool GetSelectWithRmb();

Allows right-button selection, default false. TabRmbClicked and displaying your menu are separate actions; programmatic CurrentTab is not restricted by this flag.

Returns bool

Right-button selection flag.

GetSwitchOnDragHoverbool
# GetSwitchOnDragHover
C#
public bool GetSwitchOnDragHover();

Switches tabs after a hover delay while dragging content, default true. Does not make a drop acceptable. Dragging tabs themselves does not use this hover path.

Returns bool

Switch-on-drag-hover flag.

GetTabAlignmentTabBar.AlignmentMode
# GetTabAlignment
C#
public TabBar.AlignmentMode GetTabAlignment();

Horizontal header alignment Left/Center/Right, default Left. Layout direction is handled separately; not alignment of your pages.

Returns TabBar.AlignmentMode

Current AlignmentMode.

GetTabButtonIconTexture2D
# GetTabButtonIcon
C#
public Texture2D GetTabButtonIcon(int tabIdx);

Shared auxiliary-button Texture2D, or null, rather than the main icon.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

Returns Texture2D

Shared auxiliary-button Texture2D, or null.

GetTabCloseDisplayPolicyTabBar.CloseButtonDisplayPolicy
# GetTabCloseDisplayPolicy
C#
public TabBar.CloseButtonDisplayPolicy GetTabCloseDisplayPolicy();

Built-in close-button display: default ShowNever, ShowActiveOnly or ShowAlways. Activation emits TabClosePressed; the application handles removal.

Returns TabBar.CloseButtonDisplayPolicy

Current CloseButtonDisplayPolicy.

GetTabCountint
# GetTabCount
C#
public int GetTabCount();

Record count including hidden/disabled, default 0. Setter requires a value ≥ 0: grows empty tabs or removes the tail and clamps CurrentTab. Normally changes selection without signals; first application can execute queued CurrentTab.

Returns int

Record count including hidden/disabled.

GetTabIconTexture2D
# GetTabIcon
C#
public Texture2D GetTabIcon(int tabIdx);

Returns the shared main icon, or null, separately from the auxiliary button.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

Returns Texture2D

Shared main Texture2D, or null.

GetTabIconMaxWidthint
# GetTabIconMaxWidth
C#
public int GetTabIconMaxWidth(int tabIdx);

Stored per-tab width limit rather than actual width after theme constraints.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

Returns int

Stored per-tab pixel limit.

GetTabIdxAtPointint
# GetTabIdxAtPoint
C#
public int GetTabIdxAtPoint(Vector2 point);

Index of the header under a local point in the current window, or -1. Excludes hidden records but can return disabled ones. Geometry query rather than selection or selection-permission validation.

Parameters
NameTypeDefault
pointVector2—
point

Point in TabBar local coordinates.

Returns int

Header index under the point, or -1.

GetTabLanguagestring
# GetTabLanguage
C#
public string GetTabLanguage(int tabIdx);

Returns the tab shaping language, or empty for the control locale.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns string

Shaping language, or empty.

GetTabMetadataVariant
# GetTabMetadata
C#
public Variant GetTabMetadata(int tabIdx);

Returns metadata Variant, Nil when unassigned. Reference containers inside the Variant can share contents with the original value.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns Variant

Metadata Variant, or Nil.

GetTabOffsetint
# GetTabOffset
C#
public int GetTabOffset();

Returns the current starting index of the scrolling tab window rather than a pixel offset. Indexing uses the full list, including hidden records.

Returns int

Window starting index rather than pixels.

GetTabRectRect2
# GetTabRect
C#
public Rect2 GetTabRect(int tabIdx);

Returns the header rectangle in TabBar local coordinates from the current layout cache. Negative indices count from the end (-1 is last). A rectangle for an off-window/hidden tab does not prove visibility or a hit; use GetTabIdxAtPoint to query a point.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

Returns Rect2

Rect2 in strip-local coordinates.

GetTabSizingTabBar.SizingMode
# GetTabSizing
C#
public TabBar.SizingMode GetTabSizing();

Header sizing, default FitContent. Uniform uses the widest width; Justify proportionally expands widths when space is available; Expand uses equal widths if the widest fits, otherwise falls back to FitContent. MaxTabWidth and available layout can further constrain text.

Returns TabBar.SizingMode

Current SizingMode.

GetTabTextDirectionControl.TextDirection
# GetTabTextDirection
C#
public Control.TextDirection GetTabTextDirection(int tabIdx);

Returns the stored header text direction, default Inherited.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns Control.TextDirection

Stored Control.TextDirection.

GetTabTitlestring
# GetTabTitle
C#
public string GetTabTitle(int tabIdx);

Returns the original title rather than its translation or a stable ID.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns string

Original title string.

GetTabTooltipstring
# GetTabTooltip
C#
public string GetTabTooltip(int tabIdx);

Returns the stored tooltip string.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns string

Stored tooltip.

GetTabsRearrangeGroupint
# GetTabsRearrangeGroup
C#
public int GetTabsRearrangeGroup();

Tab-transfer group between TabBars; default -1 disables cross-strip transfers. Use matching nonnegative IDs and DragToRearrangeEnabled on participants. Not an Entity group or stable tab ID.

Returns int

Transfer group ID, or -1.

IsTabDisabledbool
# IsTabDisabled
C#
public bool IsTabDisabled(int tabIdx);

Returns the record disabled flag, separate from hidden and current selection.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns bool

Record disabled flag.

IsTabHiddenbool
# IsTabHidden
C#
public bool IsTabHidden(int tabIdx);

Returns the header hidden flag rather than visibility of your application page.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

Returns bool

Record hidden flag.

MoveTabvoid
# MoveTab
C#
public void MoveTab(int from, int to);

Moves the complete record, including metadata/flags, to final index to; both indices are 0…TabCount-1. Preserves selected record while adjusting current/previous; does not itself emit TabChanged/TabSelected/ActiveTabRearranged.

Parameters
NameTypeDefault
fromint—
toint—
from

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

to

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

RemoveTabvoid
# RemoveTab
C#
public void RemoveTab(int tabIdx);

Removes an existing record. Later indices shift; current/previous are adjusted. Removing the current record emits TabChanged without TabSelected in the tree and seeks an available replacement. Removing before it can change the index without a signal.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

SelectNextAvailablebool
# SelectNextAvailable
C#
public bool SelectNextAvailable();

Selects the next higher-index record that is neither hidden nor disabled. Does not wrap; starts at the first from -1. Returns true on successful selection.

Returns bool

true when the next record was found and selected.

SelectPreviousAvailablebool
# SelectPreviousAvailable
C#
public bool SelectPreviousAvailable();

Selects the previous lower-index record that is neither hidden nor disabled. Does not wrap; returns false when CurrentTab = -1.

Returns bool

true when the previous record was found and selected.

SetClipTabsvoid
# SetClipTabs
C#
public void SetClipTabs(bool clipTabs);

Constrain the strip to available width, default true. Overflow uses navigation buttons and an index offset. false includes header widths in minimum size and resets the offset; not child ClipContents.

Parameters
NameTypeDefault
clipTabsbool—
clipTabs

Constrain the strip to available width, default true. Overflow uses navigation buttons and an index offset. false includes header widths in minimum size and resets the offset; not child ClipContents.

SetCloseWithMiddleMousevoid
# SetCloseWithMiddleMouse
C#
public void SetCloseWithMiddleMouse(bool enabled);

Allows a middle-button close request, default true. Does not automatically remove records or control close-button visibility.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows a middle-button close request, default true. Does not automatically remove records or control close-button visibility.

SetCurrentTabvoid
# SetCurrentTab
C#
public void SetCurrentTab(int tabIdx);

Selected index, -1 for none. Direct setter accepts hidden/disabled; -1 requires DeselectEnabled or no available records. Emits TabSelected even for the same index, TabChanged only on change. An initial request before initialization can be queued.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

SetDeselectEnabledvoid
# SetDeselectEnabled
C#
public void SetDeselectEnabled(bool enabled);

Allows selection -1 with available tabs, default false. Disabling without selection attempts to choose the next available tab from the start.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows selection -1 with available tabs, default false. Disabling without selection attempts to choose the next available tab from the start.

SetDragToRearrangeEnabledvoid
# SetDragToRearrangeEnabled
C#
public void SetDragToRearrangeEnabled(bool enabled);

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveTab; cross-strip transfers additionally require matching TabsRearrangeGroup.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveTab; cross-strip transfers additionally require matching TabsRearrangeGroup.

SetMaxTabWidthvoid
# SetMaxTabWidth
C#
public void SetMaxTabWidth(int width);

Pixel width limit used to shorten header text, default 0 disables the per-header limit. Requires ≥ 0. Icons, buttons and margins retain their minimum, so the complete header can exceed this value. Available layout maximum also contributes.

Parameters
NameTypeDefault
widthint—
width

Pixel width limit used to shorten header text, default 0 disables the per-header limit. Requires ≥ 0. Icons, buttons and margins retain their minimum, so the complete header can exceed this value. Available layout maximum also contributes.

SetScrollToSelectedvoid
# SetScrollToSelected
C#
public void SetScrollToSelected(bool enabled);

Automatically reveal the selected header, default true. Enabling immediately calls EnsureTabVisible for the current index. false retains selection without guaranteeing visibility; explicit EnsureTabVisible remains available.

Parameters
NameTypeDefault
enabledbool—
enabled

Automatically reveal the selected header, default true. Enabling immediately calls EnsureTabVisible for the current index. false retains selection without guaranteeing visibility; explicit EnsureTabVisible remains available.

SetScrollingEnabledvoid
# SetScrollingEnabled
C#
public void SetScrollingEnabled(bool enabled);

Allows strip scrolling through wheel/touch input, default true. Does not block EnsureTabVisible or automatic CurrentTab reveal, or hide overflow buttons.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows strip scrolling through wheel/touch input, default true. Does not block EnsureTabVisible or automatic CurrentTab reveal, or hide overflow buttons.

SetSelectWithRmbvoid
# SetSelectWithRmb
C#
public void SetSelectWithRmb(bool enabled);

Allows right-button selection, default false. TabRmbClicked and displaying your menu are separate actions; programmatic CurrentTab is not restricted by this flag.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows right-button selection, default false. TabRmbClicked and displaying your menu are separate actions; programmatic CurrentTab is not restricted by this flag.

SetSwitchOnDragHovervoid
# SetSwitchOnDragHover
C#
public void SetSwitchOnDragHover(bool enabled);

Switches tabs after a hover delay while dragging content, default true. Does not make a drop acceptable. Dragging tabs themselves does not use this hover path.

Parameters
NameTypeDefault
enabledbool—
enabled

Switches tabs after a hover delay while dragging content, default true. Does not make a drop acceptable. Dragging tabs themselves does not use this hover path.

SetTabAlignmentvoid
# SetTabAlignment
C#
public void SetTabAlignment(TabBar.AlignmentMode alignment);

Horizontal header alignment Left/Center/Right, default Left. Layout direction is handled separately; not alignment of your pages.

Parameters
NameTypeDefault
alignmentTabBar.AlignmentMode—
alignment

Horizontal header alignment Left/Center/Right, default Left. Layout direction is handled separately; not alignment of your pages.

SetTabButtonIconvoid
# SetTabButtonIcon
C#
public void SetTabButtonIcon(int tabIdx, Texture2D icon);

Sets a shared auxiliary-header-button icon; null removes the button. Separate from the main icon and built-in close button. Activation emits TabButtonPressed without deleting the tab.

Parameters
NameTypeDefault
tabIdxint—
iconTexture2D—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

icon

Sets a shared auxiliary-header-button icon; null removes the button. Separate from the main icon and built-in close button. Activation emits TabButtonPressed without deleting the tab.

SetTabCloseDisplayPolicyvoid
# SetTabCloseDisplayPolicy
C#
public void SetTabCloseDisplayPolicy(TabBar.CloseButtonDisplayPolicy policy);

Built-in close-button display: default ShowNever, ShowActiveOnly or ShowAlways. Activation emits TabClosePressed; the application handles removal.

Parameters
NameTypeDefault
policyTabBar.CloseButtonDisplayPolicy—
policy

Built-in close-button display: default ShowNever, ShowActiveOnly or ShowAlways. Activation emits TabClosePressed; the application handles removal.

SetTabCountvoid
# SetTabCount
C#
public void SetTabCount(int count);

Record count including hidden/disabled, default 0. Setter requires a value ≥ 0: grows empty tabs or removes the tail and clamps CurrentTab. Normally changes selection without signals; first application can execute queued CurrentTab.

Parameters
NameTypeDefault
countint—
count

Record count including hidden/disabled, default 0. Setter requires a value ≥ 0: grows empty tabs or removes the tail and clamps CurrentTab. Normally changes selection without signals; first application can execute queued CurrentTab.

SetTabDisabledvoid
# SetTabDisabled
C#
public void SetTabDisabled(int tabIdx, bool disabled);

Changes the disabled flag for user selection/available navigation. Does not deselect a current record or block direct CurrentTab.

Parameters
NameTypeDefault
tabIdxint—
disabledbool—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

disabled

Changes the disabled flag for user selection/available navigation. Does not deselect a current record or block direct CurrentTab.

SetTabHiddenvoid
# SetTabHidden
C#
public void SetTabHidden(int tabIdx, bool hidden);

Hides the header without removing its record. Does not change TabCount or automatically switch current selection in standalone TabBar.

Parameters
NameTypeDefault
tabIdxint—
hiddenbool—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

hidden

Hides the header without removing its record. Does not change TabCount or automatically switch current selection in standalone TabBar.

SetTabIconvoid
# SetTabIcon
C#
public void SetTabIcon(int tabIdx, Texture2D icon);

Assigns a shared main Texture2D; null removes it. Does not copy the resource; setter refreshes geometry and minimum size. Use SetTabIconMaxWidth to limit drawing rather than modifying the source texture.

Parameters
NameTypeDefault
tabIdxint—
iconTexture2D—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

icon

Assigns a shared main Texture2D; null removes it. Does not copy the resource; setter refreshes geometry and minimum size. Use SetTabIconMaxWidth to limit drawing rather than modifying the source texture.

SetTabIconMaxWidthvoid
# SetTabIconMaxWidth
C#
public void SetTabIconMaxWidth(int tabIdx, int width);

Main-icon pixel width limit, 0 for no per-tab limit. Positive values downscale preserving aspect; a stricter theme icon_max_width takes priority. Does not enlarge small icons or modify the source resource.

Parameters
NameTypeDefault
tabIdxint—
widthint—
tabIdx

Record index 0…TabCount-1. GetTabRect also accepts negative indices from the end; EnsureTabVisible(-1) does nothing.

width

Main-icon pixel width limit, 0 for no per-tab limit. Positive values downscale preserving aspect; a stricter theme icon_max_width takes priority. Does not enlarge small icons or modify the source resource.

SetTabLanguagevoid
# SetTabLanguage
C#
public void SetTabLanguage(int tabIdx, string language);

Sets shaping language for one title; empty uses the control locale. Does not translate the original string or switch application locale.

Parameters
NameTypeDefault
tabIdxint—
languagestring—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

language

Sets shaping language for one title; empty uses the control locale. Does not translate the original string or switch application locale.

SetTabMetadatavoid
# SetTabMetadata
C#
public void SetTabMetadata(int tabIdx, Variant metadata);

Sets record Variant data, such as your stable ID. MoveTab moves it with the record. Array/Dictionary remain shared containers; copy separately when independent data is needed.

Parameters
NameTypeDefault
tabIdxint—
metadataVariant—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

metadata

Sets record Variant data, such as your stable ID. MoveTab moves it with the record. Array/Dictionary remain shared containers; copy separately when independent data is needed.

SetTabSizingvoid
# SetTabSizing
C#
public void SetTabSizing(TabBar.SizingMode tabSizing);

Header sizing, default FitContent. Uniform uses the widest width; Justify proportionally expands widths when space is available; Expand uses equal widths if the widest fits, otherwise falls back to FitContent. MaxTabWidth and available layout can further constrain text.

Parameters
NameTypeDefault
tabSizingTabBar.SizingMode—
tabSizing

Header sizing, default FitContent. Uniform uses the widest width; Justify proportionally expands widths when space is available; Expand uses equal widths if the widest fits, otherwise falls back to FitContent. MaxTabWidth and available layout can further constrain text.

SetTabTextDirectionvoid
# SetTabTextDirection
C#
public void SetTabTextDirection(int tabIdx, Control.TextDirection direction);

Sets one title’s shaping direction. Inherited uses layout direction; Ltr/Rtl do not reverse the stored string.

Parameters
NameTypeDefault
tabIdxint—
directionControl.TextDirection—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

direction

Sets one title’s shaping direction. Inherited uses layout direction; Ltr/Rtl do not reverse the stored string.

SetTabTitlevoid
# SetTabTitle
C#
public void SetTabTitle(int tabIdx, string title);

Sets the original title and refreshes shaping/geometry. Display can use translation; index and metadata are unchanged.

Parameters
NameTypeDefault
tabIdxint—
titlestring—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

title

Sets the original title and refreshes shaping/geometry. Display can use translation; index and metadata are unchanged.

SetTabTooltipvoid
# SetTabTooltip
C#
public void SetTabTooltip(int tabIdx, string tooltip);

Sets a separate header tooltip. Does not change title, index or metadata.

Parameters
NameTypeDefault
tabIdxint—
tooltipstring—
tabIdx

Current record index 0…TabCount-1; only SetCurrentTab accepts -1 for deselection.

tooltip

Sets a separate header tooltip. Does not change title, index or metadata.

SetTabsRearrangeGroupvoid
# SetTabsRearrangeGroup
C#
public void SetTabsRearrangeGroup(int groupId);

Tab-transfer group between TabBars; default -1 disables cross-strip transfers. Use matching nonnegative IDs and DragToRearrangeEnabled on participants. Not an Entity group or stable tab ID.

Parameters
NameTypeDefault
groupIdint—
groupId

Tab-transfer group between TabBars; default -1 disables cross-strip transfers. Use matching nonnegative IDs and DragToRearrangeEnabled on participants. Not an Entity group or stable tab ID.

Signals and events8

ActiveTabRearrangedEvent
# ActiveTabRearranged
C#
public event TabBar.ActiveTabRearrangedEventHandler ActiveTabRearranged;

Drag-path notification of the new index for the tab being activated. Code-driven MoveTab does not itself emit it. Resolve your own metadata ID again after reordering.

Handler parameters
NameTypeDefault
idxTolong—
idxTo

Tab index at notification time rather than a stable ID.

TabButtonPressedEvent
# TabButtonPressed
C#
public event TabBar.TabButtonPressedEventHandler TabButtonPressed;

Auxiliary SetTabButtonIcon button was activated. Separate from TabClosePressed; no automatic deletion.

Handler parameters
NameTypeDefault
tablong—
tab

Record index at event time; selection notifications can supply -1.

TabChangedEvent
# TabChanged
C#
public event TabBar.TabChangedEventHandler TabChanged;

Notification from CurrentTab on selection change, or RemoveTab when deleting the current record. Not universal index observation: MoveTab, ClearTabs and ordinary SetTabCount can change state without it. -1 means no selection.

Handler parameters
NameTypeDefault
tablong—
tab

Record index at event time; selection notifications can supply -1.

TabClickedEvent
# TabClicked
C#
public event TabBar.TabClickedEventHandler TabClicked;

User clicked a tab. Programmatic CurrentTab does not emit it; clicking again may leave selection unchanged.

Handler parameters
NameTypeDefault
tablong—
tab

Record index at event time; selection notifications can supply -1.

TabClosePressedEvent
# TabClosePressed
C#
public event TabBar.TabClosePressedEventHandler TabClosePressed;

Close request from the close button/allowed middle click. Does not itself remove the record. Check whether closing is allowed, then explicitly remove the model/page and call RemoveTab.

Handler parameters
NameTypeDefault
tablong—
tab

Record index at event time; selection notifications can supply -1.

TabHoveredEvent
# TabHovered
C#
public event TabBar.TabHoveredEventHandler TabHovered;

Pointer entered a different header. Not selection; leaving the strip does not guarantee a separate event with -1. Disabled headers can also participate in hover geometry.

Handler parameters
NameTypeDefault
tablong—
tab

Tab index at notification time rather than a stable ID.

TabRmbClickedEvent
# TabRmbClicked
C#
public event TabBar.TabRmbClickedEventHandler TabRmbClicked;

Right click on a tab. SelectWithRmb separately controls right-button selection; use the signal for your own context menu.

Handler parameters
NameTypeDefault
tablong—
tab

Record index at event time; selection notifications can supply -1.

TabSelectedEvent
# TabSelected
C#
public event TabBar.TabSelectedEventHandler TabSelected;

CurrentTab selection request, including reselection and programmatic assignment. Precedes TabChanged on change. Structural MoveTab/RemoveTab/ClearTabs/ordinary SetTabCount need not emit it.

Handler parameters
NameTypeDefault
tablong—
tab

Record index at event time; selection notifications can supply -1.

TabBar.AlignmentMode

ValueDescription
Center = 1

Aligns tabs in the middle.

Left = 0

Aligns tabs to the left.

Max = 3

Represents the size of the TabBar.AlignmentMode enum.

Right = 2

Aligns tabs to the right.

TabBar.CloseButtonDisplayPolicy

ValueDescription
Max = 3

Represents the size of the TabBar.CloseButtonDisplayPolicy enum.

ShowActiveOnly = 1

Only show the close button on the currently active tab.

ShowAlways = 2

Show the close button on all tabs.

ShowNever = 0

Never show the close buttons.

TabBar.SizingMode

ValueDescription
Expand = 3

Size tabs equally, expanding to the full width of the tab bar if there is room, otherwise fall back to TabBar.SizingMode.FitContent.

FitContent = 0

Size tabs individually according to the size of their content.

Justify = 2

Size tabs individually according to their content, expanding to the full width of the tab bar.

Max = 4

Represents the size of the TabBar.SizingMode enum.

Uniform = 1

Size tabs uniformly, with the widest tab determining the size of all tabs. This may trigger clipping sooner than other sizing modes due to increased tab sizes.

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
drop_mark_color
Color

Modulation color for the TabBar.drop_mark icon.

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

Font color of disabled tabs.

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

Font color of the currently hovered tab. Does not apply to the selected tab.

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

The tint of text outline of the tab name.

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

Font color of the currently selected tab.

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

Font color of the other, unselected tabs.

Default: Color(0.7, 0.7, 0.7, 1)
icon_disabled_color
Color

Icon color of disabled tabs.

Default: Color(1, 1, 1, 1)
icon_hovered_color
Color

Icon color of the currently hovered tab. Does not apply to the selected tab.

Default: Color(1, 1, 1, 1)
icon_selected_color
Color

Icon color of the currently selected tab.

Default: Color(1, 1, 1, 1)
icon_unselected_color
Color

Icon color of the other, unselected tabs.

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

The horizontal separation between the elements inside tabs.

Default: 4
hover_switch_wait_msec
int

During a drag-and-drop, this is how many milliseconds to wait before switching the tab.

Default: 500
icon_max_width
int

The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with TabBar.SetTabIconMaxWidth. The height is adjusted according to the icon's ratio.

Default: 0
outline_size
int

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

Default: 0
tab_separation
int

The space between tabs in the tab bar.

Default: 0
font
Font

The font used to draw tab names.

font_size
int

Font size of the tab names.

close
Texture2D

The icon for the close button (see TabBar.TabCloseDisplayPolicy).

decrement
Texture2D

Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.

decrement_highlight
Texture2D

Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.

drop_mark
Texture2D

Icon shown to indicate where a dragged tab will be dropped (see TabBar.DragToRearrangeEnabled).

increment
Texture2D

Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.

increment_highlight
Texture2D

Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.

drag_ended_sound
AudioStream

Played when a tab is done being dragged to rearrange it. Can only be heard if TabBar.DragToRearrangeEnabled is true.

drag_started_sound
AudioStream

Played when a tab is beginning to be dragged to rearrange it. Can only be heard if TabBar.DragToRearrangeEnabled is true.

focus_sound
AudioStream

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

hover_sound
AudioStream

Played when a tab is hovered with the mouse.

pressed_disabled_sound
AudioStream

Played when the tab close button is pressed while the tab is disabled, or when pressing the previous/next tab navigation buttons when already at the beginning/end of the list.

pressed_sound
AudioStream

Played when the tab close or previous/next tab navigation buttons are pressed.

button_highlight
StyleBox

Background of the tab and close buttons when they're being hovered with the cursor.

button_pressed
StyleBox

Background of the tab and close buttons when it's being pressed.

tab_disabled
StyleBox

The style of disabled tabs.

tab_focus
StyleBox

StyleBox used when the TabBar is focused. The TabBar.tab_focus StyleBox is displayed over the base StyleBox of the selected tab, so a partially transparent StyleBox should be used to ensure the base StyleBox remains visible. A StyleBox that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a StyleBoxEmpty resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.

tab_hovered
StyleBox

The style of the currently hovered tab. Does not apply to the selected tab. Note: This style will be drawn with the same width as TabBar.tab_unselected at minimum.

tab_selected
StyleBox

The style of the currently selected tab.

tab_unselected
StyleBox

The style of the other, unselected tabs.

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.