reckfellENGINE

TabContainer

Page container with tab headers and a single selected page.

On this page
class TabContainerReckfellSharpInherits Container

Add pages as direct Control children. Nested elements belong to their page; a plain Entity does not create a tab. TopLevel controls are excluded from tab layout. Default header text comes from the page Name. GetTabControl/GetCurrentTabControl return existing children owned by the container, not copies to free.

Indices start at 0 and include hidden/disabled tabs. They can change after MoveChild, page insertion or removal. Do not persist an index as a stable ID: store your key through SetTabMetadata or retain a page reference and resolve its index with GetTabIdxFromControl. Do not substitute GetChild(index) for GetTabControl: helper Entities and internal children can also exist.

CurrentTab selects a page. It is -1 in an empty container; deselection with pages normally requires DeselectEnabled = true. The programmatic setter does not prevent selecting a disabled tab. To choose only available pages, use SelectNextAvailable/SelectPreviousAvailable: they skip hidden/disabled tabs, return bool and stop at the edge without wrapping.

Assigning CurrentTab emits TabSelected even for the same index; TabChanged occurs only on change. TabSelected arrives before page updates through TabChanged, so do not assume the Visible switch has finished inside it. TabChanged is normally suitable for initializing selected-page content. TabClicked represents a user click and is not emitted by programmatic selection. GetPreviousTab reflects the previous selection assignment; after reselection it can equal CurrentTab.

The container manages page Visible state. Calling Show() on an inactive page selects it. Hiding an active page can select the next/previous available page, deselect, or show the only page again. Use SetTabHidden to hide one header; use TabsVisible = false to hide the entire strip. Hiding the strip does not hide the selected page.

UseHiddenTabsForMinSize defaults to false: inactive pages with Visible = false do not determine content minimum size. Enable it to keep window minimum size stable when switching to a larger page. The calculation also includes panel margins and the visible tab strip; it is not merely the sum of header sizes. The container sets active-page anchors/offsets; put custom layout inside that page.

Before entering the tree, CurrentTab stores the requested index for later application. For dynamic UI, add pages and the container to the tree before selecting a valid index. GetTabBar returns the shared internal TabBar: do not free it or add/remove its tabs directly, which would desynchronize headers and pages.

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

Constructors1

TabContainerConstructor
# TabContainer
C#
public TabContainer();

Creates an empty container: CurrentTab = -1, TabsVisible = true, DeselectEnabled = false, UseHiddenTabsForMinSize = false. Add pages as Control children.

Properties13

AllTabsInFrontProperty · Deprecated
# AllTabsInFront
C#
public bool AllTabsInFront { get; set; }

Legacy setting with no effect in the current implementation. Getter returns false; setter does not change order, and true can warn. Do not use it to control layers or page order.

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

Constrain the strip to available width, default true. Insufficient space makes some headers scrollable; false includes their widths in minimum size and can expand the container. Not page ClipContents.

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

Selected page index, -1 in an empty container. Valid indices are 0…GetTabCount()-1; -1 requires enabled deselection or no available tabs. Setter can select disabled tabs. Requests before tree entry are deferred. Repeating the index emits TabSelected without TabChanged.

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

Allows no selected page, default false. Enable and assign CurrentTab = -1 to explicitly deselect. Disabling while at -1 attempts to select the first available tab.

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

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveChild. For transfers between containers also configure matching TabsRearrangeGroup values.

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

Switch tabs on hover while dragging content, default true. Does not determine drop acceptance or enable tab reordering. Dragging tabs themselves uses a separate path.

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

Header alignment Left/Center/Right, default Left. Affects the internal TabBar and theme margins rather than page content. Layout direction is handled separately.

TabFocusModeProperty
# TabFocusMode
C#
public Control.FocusModeEnum TabFocusMode { get; set; }

FocusMode of the internal strip, default All. None disables header focus without changing FocusMode of buttons/fields within pages.

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

Header-width mode, default FitContent. FitContent uses individual content width; Uniform uses the widest width for all. Justify proportionally expands widths when space is available; Expand divides space equally if the widest header fits, otherwise falls back to FitContent. Does not set page size.

TabsPositionProperty
# TabsPosition
C#
public TabContainer.TabPosition TabsPosition { get; set; }

Tab strip at the top or bottom: default Top. Bottom moves headers and vertically flips their style box rather than page content. Relayout is deferred.

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

Cross-container tab-transfer group; default -1 disables transfers between containers. Set a matching nonnegative ID and enable DragToRearrangeEnabled on participants. Not an Entity group or a stable tab ID.

TabsVisibleProperty
# TabsVisible
C#
public bool TabsVisible { get; set; }

Show the header strip, default true. false removes the strip and its layout space while retaining the selected page and index.

UseHiddenTabsForMinSizeProperty
# UseHiddenTabsForMinSize
C#
public bool UseHiddenTabsForMinSize { get; set; }

Include invisible pages, including inactive ones, in minimum-size calculation; default false. true takes the componentwise maximum across pages and helps prevent minimum-size changes on switching.

Methods53

AreTabsVisiblebool
# AreTabsVisible
C#
public bool AreTabsVisible();

Show the header strip, default true. false removes the strip and its layout space while retaining the selected page and index.

Returns bool

Tab-strip display flag.

GetClipTabsbool
# GetClipTabs
C#
public bool GetClipTabs();

Constrain the strip to available width, default true. Insufficient space makes some headers scrollable; false includes their widths in minimum size and can expand the container. Not page ClipContents.

Returns bool

Strip-width constraint flag.

GetCurrentTabint
# GetCurrentTab
C#
public int GetCurrentTab();

Selected page index, -1 in an empty container. Valid indices are 0…GetTabCount()-1; -1 requires enabled deselection or no available tabs. Setter can select disabled tabs. Requests before tree entry are deferred. Repeating the index emits TabSelected without TabChanged.

Returns int

Current index, or -1 without selection.

GetCurrentTabControlControl
# GetCurrentTabControl
C#
public Control GetCurrentTabControl();

Returns the current child page, or null without selection. This is an existing Control rather than a new instance.

Returns Control

Shared selected page, or null.

GetDeselectEnabledbool
# GetDeselectEnabled
C#
public bool GetDeselectEnabled();

Allows no selected page, default false. Enable and assign CurrentTab = -1 to explicitly deselect. Disabling while at -1 attempts to select the first available tab.

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 MoveChild. For transfers between containers also configure matching TabsRearrangeGroup values.

Returns bool

User drag-to-reorder permission flag.

GetPopupPopup
# GetPopup
C#
public Popup GetPopup();

Returns the assigned shared Popup, or null. The container stores an object ID rather than owning its lifetime; detach through SetPopup(null) before freeing the menu.

Returns Popup

Shared assigned Popup, or null.

GetPreviousTabint
# GetPreviousTab
C#
public int GetPreviousTab();

Index before the last selection assignment. Assigning the same CurrentTab updates previous to that index; not necessarily the last different page or a stable ID.

Returns int

Index before the latest selection assignment.

GetSwitchOnDragHoverbool
# GetSwitchOnDragHover
C#
public bool GetSwitchOnDragHover();

Switch tabs on hover while dragging content, default true. Does not determine drop acceptance or enable tab reordering. Dragging tabs themselves uses a separate path.

Returns bool

Switch-on-drag-hover flag.

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

Header alignment Left/Center/Right, default Left. Affects the internal TabBar and theme margins rather than page content. Layout direction is handled separately.

Returns TabBar.AlignmentMode

Current TabBar.AlignmentMode.

GetTabBarTabBar
# GetTabBar
C#
public TabBar GetTabBar();

Shared internal TabBar. Do not free it or directly change its tab count: headers must correspond to TabContainer child pages. Use container methods for selection and tab properties.

Returns TabBar

Shared internal TabBar.

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

Returns the shared auxiliary-button icon, or null. Does not return the tab’s main icon.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current tab index 0…GetTabCount()-1 rather than a stable ID.

Returns Texture2D

Shared auxiliary-button Texture2D, or null.

GetTabControlControl
# GetTabControl
C#
public Control GetTabControl(int tabIdx);

Returns the child page at a tab index. Returns null for negative/nonexistent indices. Shared reference: do not free it while the container owns the page.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

Returns Control

Shared child page, or null.

GetTabCountint
# GetTabCount
C#
public int GetTabCount();

Number of tab pages, including hidden/disabled ones. Not the total Entity child count or visible-header count.

Returns int

Page count including hidden/disabled.

GetTabFocusModeControl.FocusModeEnum
# GetTabFocusMode
C#
public Control.FocusModeEnum GetTabFocusMode();

FocusMode of the internal strip, default All. None disables header focus without changing FocusMode of buttons/fields within pages.

Returns Control.FocusModeEnum

Internal strip FocusMode.

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

Returns the shared main header icon, or null. Separate from the auxiliary SetTabButtonIcon slot.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current tab index 0…GetTabCount()-1 rather than a stable ID.

Returns Texture2D

Shared main Texture2D, or null.

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

Returns the stored per-tab width limit, default 0. Not the actual drawn width or combined theme limit.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Current tab index 0…GetTabCount()-1 rather than a stable ID.

Returns int

Stored pixel width limit; 0 for no per-tab limit.

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

Returns the header index under a point, or -1. The current implementation forwards the point directly to the internal TabBar: use its local coordinates, such as GetTabBar().GetLocalMousePosition(), rather than page/screen/container coordinates. This matters with Bottom and strip offsets. A disabled header can still be under the point.

Parameters
NameTypeDefault
pointVector2—
point

Point in GetTabBar() local coordinates rather than the whole TabContainer.

Returns int

Matched header index, or -1.

GetTabIdxFromControlint
# GetTabIdxFromControl
C#
public int GetTabIdxFromControl(Control control);

Finds the current index of a direct child page. Requires a non-null Control with this parent; a wrong parent reports an error and returns -1. Across reorders retain the page reference/ID rather than its old index.

Parameters
NameTypeDefault
controlControl—
control

Non-null direct child page of this container.

Returns int

Current page index, or -1 when absent/invalid.

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

Returns Variant tab data. Returns Nil when no metadata was assigned. Use an expected type for your ID and validate before conversion.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

Returns Variant

Metadata Variant, or Nil.

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

Header-width mode, default FitContent. FitContent uses individual content width; Uniform uses the widest width for all. Justify proportionally expands widths when space is available; Expand divides space equally if the widest header fits, otherwise falls back to FitContent. Does not set page size.

Returns TabBar.SizingMode

Current TabBar.SizingMode.

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

Returns the stored tab title, separate from the page name and stable ID.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

Returns string

Stored tab title.

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

Returns the stored header tooltip.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

Returns string

Stored tab tooltip.

GetTabsPositionTabContainer.TabPosition
# GetTabsPosition
C#
public TabContainer.TabPosition GetTabsPosition();

Tab strip at the top or bottom: default Top. Bottom moves headers and vertically flips their style box rather than page content. Relayout is deferred.

Returns TabContainer.TabPosition

Top or Bottom.

GetTabsRearrangeGroupint
# GetTabsRearrangeGroup
C#
public int GetTabsRearrangeGroup();

Cross-container tab-transfer group; default -1 disables transfers between containers. Set a matching nonnegative ID and enable DragToRearrangeEnabled on participants. Not an Entity group or a stable tab ID.

Returns int

Transfer group ID, or -1.

GetUseHiddenTabsForMinSizebool
# GetUseHiddenTabsForMinSize
C#
public bool GetUseHiddenTabsForMinSize();

Include invisible pages, including inactive ones, in minimum-size calculation; default false. true takes the componentwise maximum across pages and helps prevent minimum-size changes on switching.

Returns bool

Whether invisible pages contribute to minimum size.

IsAllTabsInFrontbool
# IsAllTabsInFront
C#
public bool IsAllTabsInFront();

Legacy setting with no effect in the current implementation. Getter returns false; setter does not change order, and true can warn. Do not use it to control layers or page order.

Returns bool

Always false in the current implementation.

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

Returns the header disabled flag; not page Visible state or a guarantee that the page is unselected.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

Returns bool

Specified header’s disabled flag.

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

Header hidden flag. Not equivalent to !Visible: an inactive page is normally invisible while its header remains visible.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

Returns bool

Specified header’s hidden flag.

SelectNextAvailablebool
# SelectNextAvailable
C#
public bool SelectNextAvailable();

Selects the next higher-index tab that is neither hidden nor disabled; returns true on success. Does not wrap from the end to the start. With CurrentTab = -1 searches from the first tab.

Returns bool

true if the next available tab was found and selected.

SelectPreviousAvailablebool
# SelectPreviousAvailable
C#
public bool SelectPreviousAvailable();

Selects the previous lower-index available tab, skipping hidden/disabled. Returns false without changing selection when none exists to the left; does not wrap.

Returns bool

true if the previous available tab was found and selected.

SetAllTabsInFrontvoid
# SetAllTabsInFront
C#
public void SetAllTabsInFront(bool isFront);

Legacy setting with no effect in the current implementation. Getter returns false; setter does not change order, and true can warn. Do not use it to control layers or page order.

Parameters
NameTypeDefault
isFrontbool—
isFront

Legacy setting with no effect in the current implementation. Getter returns false; setter does not change order, and true can warn. Do not use it to control layers or page order.

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

Constrain the strip to available width, default true. Insufficient space makes some headers scrollable; false includes their widths in minimum size and can expand the container. Not page ClipContents.

Parameters
NameTypeDefault
clipTabsbool—
clipTabs

Constrain the strip to available width, default true. Insufficient space makes some headers scrollable; false includes their widths in minimum size and can expand the container. Not page ClipContents.

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

Selected page index, -1 in an empty container. Valid indices are 0…GetTabCount()-1; -1 requires enabled deselection or no available tabs. Setter can select disabled tabs. Requests before tree entry are deferred. Repeating the index emits TabSelected without TabChanged.

Parameters
NameTypeDefault
tabIdxint—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

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

Allows no selected page, default false. Enable and assign CurrentTab = -1 to explicitly deselect. Disabling while at -1 attempts to select the first available tab.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows no selected page, default false. Enable and assign CurrentTab = -1 to explicitly deselect. Disabling while at -1 attempts to select the first available tab.

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

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveChild. For transfers between containers also configure matching TabsRearrangeGroup values.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows user drag-to-reorder, default false. Does not prevent code-driven MoveChild. For transfers between containers also configure matching TabsRearrangeGroup values.

SetPopupvoid
# SetPopup
C#
public void SetPopup(Entity popup);

Assigns a reference to an existing Popup, such as PopupMenu; null detaches. The parameter is Entity, but another type clears the assignment. Does not add it to the tree, reparent, open or free it. Add the Popup to the tree yourself and detach before freeing it.

Parameters
NameTypeDefault
popupEntity—
popup

Assigns a reference to an existing Popup, such as PopupMenu; null detaches. The parameter is Entity, but another type clears the assignment. Does not add it to the tree, reparent, open or free it. Add the Popup to the tree yourself and detach before freeing it.

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

Switch tabs on hover while dragging content, default true. Does not determine drop acceptance or enable tab reordering. Dragging tabs themselves uses a separate path.

Parameters
NameTypeDefault
enabledbool—
enabled

Switch tabs on hover while dragging content, default true. Does not determine drop acceptance or enable tab reordering. Dragging tabs themselves uses a separate path.

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

Header alignment Left/Center/Right, default Left. Affects the internal TabBar and theme margins rather than page content. Layout direction is handled separately.

Parameters
NameTypeDefault
alignmentTabBar.AlignmentMode—
alignment

Header alignment Left/Center/Right, default Left. Affects the internal TabBar and theme margins rather than page content. Layout direction is handled separately.

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

Sets an icon for a separate header button; null removes the button. Does not change the main icon. Activation emits TabButtonPressed; implement page removal/closing yourself.

Parameters
NameTypeDefault
tabIdxint—
iconTexture2D—
tabIdx

Current tab index 0…GetTabCount()-1 rather than a stable ID.

icon

Sets an icon for a separate header button; null removes the button. Does not change the main icon. Activation emits TabButtonPressed; implement page removal/closing yourself.

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

Prevents choosing the header through user input and available-tab navigation. Does not hide the page or switch away from a current tab; programmatic CurrentTab can still select it.

Parameters
NameTypeDefault
tabIdxint—
disabledbool—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

disabled

Prevents choosing the header through user input and available-tab navigation. Does not hide the page or switch away from a current tab; programmatic CurrentTab can still select it.

SetTabFocusModevoid
# SetTabFocusMode
C#
public void SetTabFocusMode(Control.FocusModeEnum focusMode);

FocusMode of the internal strip, default All. None disables header focus without changing FocusMode of buttons/fields within pages.

Parameters
NameTypeDefault
focusModeControl.FocusModeEnum—
focusMode

FocusMode of the internal strip, default All. None disables header focus without changing FocusMode of buttons/fields within pages.

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

Hides/restores the header without removing its page or changing tab count. Changing it also hides the page and reconciles selection; hiding the current tab can select another. Configure after adding the page.

Parameters
NameTypeDefault
tabIdxint—
hiddenbool—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

hidden

Hides/restores the header without removing its page or changing tab count. Changing it also hides the page and reconciles selection; hiding the current tab can select another. Configure after adding the page.

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

Assigns a shared Texture2D as the main header icon; null removes it. Requires an existing page. Does not copy the resource; assignment refreshes margins/drawing. Size is constrained by the theme and SetTabIconMaxWidth.

Parameters
NameTypeDefault
tabIdxint—
iconTexture2D—
tabIdx

Current tab index 0…GetTabCount()-1 rather than a stable ID.

icon

Assigns a shared Texture2D as the main header icon; null removes it. Requires an existing page. Does not copy the resource; assignment refreshes margins/drawing. Size is constrained by the theme and SetTabIconMaxWidth.

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

Maximum main-icon width in local pixels. 0 means no per-tab limit; positive values preserve aspect ratio and combine with the stricter theme icon_max_width. Does not enlarge a small icon or modify Texture2D.

Parameters
NameTypeDefault
tabIdxint—
widthint—
tabIdx

Current tab index 0…GetTabCount()-1 rather than a stable ID.

width

Maximum main-icon width in local pixels. 0 means no per-tab limit; positive values preserve aspect ratio and combine with the stricter theme icon_max_width. Does not enlarge a small icon or modify Texture2D.

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

Stores Variant tab data, such as your stable ID. Data belongs to the tab record and moves with it; its index does not become a stable key. Reference containers inside a Variant can remain shared.

Parameters
NameTypeDefault
tabIdxint—
metadataVariant—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

metadata

Stores Variant tab data, such as your stable ID. Data belongs to the tab record and moves with it; its index does not become a stable key. Reference containers inside a Variant can remain shared.

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

Header-width mode, default FitContent. FitContent uses individual content width; Uniform uses the widest width for all. Justify proportionally expands widths when space is available; Expand divides space equally if the widest header fits, otherwise falls back to FitContent. Does not set page size.

Parameters
NameTypeDefault
tabSizingTabBar.SizingMode—
tabSizing

Header-width mode, default FitContent. FitContent uses individual content width; Uniform uses the widest width for all. Justify proportionally expands widths when space is available; Expand divides space equally if the widest header fits, otherwise falls back to FitContent. Does not set page size.

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

Sets the header text without renaming the page Control. A custom title survives page renames; assigning the current Name restores name tracking.

Parameters
NameTypeDefault
tabIdxint—
titlestring—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

title

Sets the header text without renaming the page Control. A custom title survives page renames; assigning the current Name restores name tracking.

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

Sets the header tooltip without changing title, name or index. Requires an existing tab.

Parameters
NameTypeDefault
tabIdxint—
tooltipstring—
tabIdx

Tab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.

tooltip

Sets the header tooltip without changing title, name or index. Requires an existing tab.

SetTabsPositionvoid
# SetTabsPosition
C#
public void SetTabsPosition(TabContainer.TabPosition tabsPosition);

Tab strip at the top or bottom: default Top. Bottom moves headers and vertically flips their style box rather than page content. Relayout is deferred.

Parameters
NameTypeDefault
tabsPositionTabContainer.TabPosition—
tabsPosition

Tab strip at the top or bottom: default Top. Bottom moves headers and vertically flips their style box rather than page content. Relayout is deferred.

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

Cross-container tab-transfer group; default -1 disables transfers between containers. Set a matching nonnegative ID and enable DragToRearrangeEnabled on participants. Not an Entity group or a stable tab ID.

Parameters
NameTypeDefault
groupIdint—
groupId

Cross-container tab-transfer group; default -1 disables transfers between containers. Set a matching nonnegative ID and enable DragToRearrangeEnabled on participants. Not an Entity group or a stable tab ID.

SetTabsVisiblevoid
# SetTabsVisible
C#
public void SetTabsVisible(bool visible);

Show the header strip, default true. false removes the strip and its layout space while retaining the selected page and index.

Parameters
NameTypeDefault
visiblebool—
visible

Show the header strip, default true. false removes the strip and its layout space while retaining the selected page and index.

SetUseHiddenTabsForMinSizevoid
# SetUseHiddenTabsForMinSize
C#
public void SetUseHiddenTabsForMinSize(bool enabled);

Include invisible pages, including inactive ones, in minimum-size calculation; default false. true takes the componentwise maximum across pages and helps prevent minimum-size changes on switching.

Parameters
NameTypeDefault
enabledbool—
enabled

Include invisible pages, including inactive ones, in minimum-size calculation; default false. true takes the componentwise maximum across pages and helps prevent minimum-size changes on switching.

Signals and events7

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

Drag-path notification giving the new index of the tab being activated. Not a universal reorder signal: code-driven MoveChild does not itself emit it. Resolve indices again by page reference/metadata after reordering.

Handler parameters
NameTypeDefault
idxTolong—
idxTo

New tab index after the drag operation.

PrePopupPressedEvent
# PrePopupPressed
C#
public event Action PrePopupPressed;

Emitted by the extra-menu button before positioning and opening the assigned Popup. Use to refresh items. Do not free/replace the Popup in this handler: the current path already captured the object it will open. SetPopup itself does not emit it.

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

Auxiliary button created through SetTabButtonIcon was activated. Supplies a tab index; the container does not remove the page itself. Capture its reference/metadata before reordering or removing.

Handler parameters
NameTypeDefault
tablong—
tab

Current tab index 0…GetTabCount()-1 rather than a stable ID.

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

Selected tab index changed, including programmatic selection. The container updates page visibility before this notification; -1 means no selected page. Not emitted when assigning the same index.

Handler parameters
NameTypeDefault
tablong—
tab

Tab index at event time; selection/change can use -1 for no page.

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

User clicked a tab header. Programmatic CurrentTab does not emit this signal; clicking the selected tab need not switch pages.

Handler parameters
NameTypeDefault
tablong—
tab

Tab index at event time; selection/change can use -1 for no page.

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

Pointer hovered over the specified tab header. Not page selection or a CurrentTab change notification.

Handler parameters
NameTypeDefault
tablong—
tab

Tab index at event time; selection/change can use -1 for no page.

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

Tab selection, including reselection and programmatic CurrentTab. On change arrives before TabChanged and page visibility updates; use TabChanged for completed page switching.

Handler parameters
NameTypeDefault
tablong—
tab

Tab index at event time; selection/change can use -1 for no page.

TabContainer.TabPosition

ValueDescription
Bottom = 1

Places the tab bar at the bottom. The tab bar's StyleBox will be flipped vertically.

Max = 2

Represents the size of the TabContainer.TabPosition enum.

Top = 0

Places the tab bar at the top.

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 TabContainer.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)
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
icon_separation
int

Space between tab's name and its icon.

Default: 4
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 TabContainer.outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.

Default: 0
side_margin
int

The space at the left or right edges of the tab bar, accordingly with the current TabContainer.TabAlignment. The margin is ignored with TabBar.AlignmentMode.Right if the tabs are clipped (see TabContainer.ClipTabs) or a popup has been set (see TabContainer.SetPopup). The margin is always ignored with TabBar.AlignmentMode.Center.

Default: 8
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.

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 TabContainer.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.

menu
Texture2D

The icon for the menu button (see TabContainer.SetPopup).

menu_highlight
Texture2D

The icon for the menu button (see TabContainer.SetPopup) when it's 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 TabContainer.DragToRearrangeEnabled is true.

drag_started_sound
AudioStream

Played when a tab is beginning to be dragged to rearrange it. Can only be heard if TabContainer.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.

panel
StyleBox

The style for the background fill.

tab_disabled
StyleBox

The style of disabled tabs.

tab_focus
StyleBox

StyleBox used when the TabBar is focused. The TabContainer.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. Note: This style will be drawn with the same width as TabContainer.tab_unselected at minimum.

tab_selected
StyleBox

The style of the currently selected tab.

tab_unselected
StyleBox

The style of the other, unselected tabs.

tabbar_background
StyleBox

The style for the background fill of the TabBar area.

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.