TabContainer
Page container with tab headers and a single selected page.
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
public TabContainer();Creates an empty container: CurrentTab = -1, TabsVisible = true, DeselectEnabled = false, UseHiddenTabsForMinSize = false. Add pages as Control children.
Properties13
AllTabsInFrontProperty · Deprecated
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
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
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
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
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
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
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
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
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
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
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
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.
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
public bool AreTabsVisible();Show the header strip, default true. false removes the strip and its layout space while retaining the selected page and index.
boolTab-strip display flag.
GetClipTabsbool
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.
boolStrip-width constraint flag.
GetCurrentTabint
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.
intCurrent index, or -1 without selection.
GetCurrentTabControlControl
public Control GetCurrentTabControl();Returns the current child page, or null without selection. This is an existing Control rather than a new instance.
ControlShared selected page, or null.
GetDeselectEnabledbool
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.
boolWhether explicit deselection is allowed.
GetDragToRearrangeEnabledbool
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.
boolUser drag-to-reorder permission flag.
GetPopupPopup
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.
PopupShared assigned Popup, or null.
GetPreviousTabint
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.
intIndex before the latest selection assignment.
GetSwitchOnDragHoverbool
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.
boolSwitch-on-drag-hover flag.
GetTabAlignmentTabBar.AlignmentMode
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.
TabBar.AlignmentModeCurrent TabBar.AlignmentMode.
GetTabBarTabBar
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.
TabBarShared internal TabBar.
GetTabButtonIconTexture2D
public Texture2D GetTabButtonIcon(int tabIdx);Returns the shared auxiliary-button icon, or null. Does not return the tab’s main icon.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
Texture2DShared auxiliary-button Texture2D, or null.
GetTabControlControl
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
ControlShared child page, or null.
GetTabCountint
public int GetTabCount();Number of tab pages, including hidden/disabled ones. Not the total Entity child count or visible-header count.
intPage count including hidden/disabled.
GetTabFocusModeControl.FocusModeEnum
public Control.FocusModeEnum GetTabFocusMode();FocusMode of the internal strip, default All. None disables header focus without changing FocusMode of buttons/fields within pages.
Control.FocusModeEnumInternal strip FocusMode.
GetTabIconTexture2D
public Texture2D GetTabIcon(int tabIdx);Returns the shared main header icon, or null. Separate from the auxiliary SetTabButtonIcon slot.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
Texture2DShared main Texture2D, or null.
GetTabIconMaxWidthint
public int GetTabIconMaxWidth(int tabIdx);Returns the stored per-tab width limit, default 0. Not the actual drawn width or combined theme limit.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
intStored pixel width limit; 0 for no per-tab limit.
GetTabIdxAtPointint
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.
| Name | Type | Default |
|---|---|---|
point | Vector2 | — |
pointPoint in GetTabBar() local coordinates rather than the whole TabContainer.
intMatched header index, or -1.
GetTabIdxFromControlint
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.
| Name | Type | Default |
|---|---|---|
control | Control | — |
controlNon-null direct child page of this container.
intCurrent page index, or -1 when absent/invalid.
GetTabMetadataVariant
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
VariantMetadata Variant, or Nil.
GetTabSizingTabBar.SizingMode
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.
TabBar.SizingModeCurrent TabBar.SizingMode.
GetTabTitlestring
public string GetTabTitle(int tabIdx);Returns the stored tab title, separate from the page name and stable ID.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
stringStored tab title.
GetTabTooltipstring
public string GetTabTooltip(int tabIdx);Returns the stored header tooltip.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
stringStored tab tooltip.
GetTabsPositionTabContainer.TabPosition
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.
TabContainer.TabPositionTop or Bottom.
GetTabsRearrangeGroupint
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.
intTransfer group ID, or -1.
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.
boolWhether invisible pages contribute to minimum size.
IsAllTabsInFrontbool
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.
boolAlways false in the current implementation.
IsTabDisabledbool
public bool IsTabDisabled(int tabIdx);Returns the header disabled flag; not page Visible state or a guarantee that the page is unselected.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
boolSpecified header’s disabled flag.
public bool IsTabHidden(int tabIdx);Header hidden flag. Not equivalent to !Visible: an inactive page is normally invisible while its header remains visible.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
boolSpecified header’s hidden flag.
SelectNextAvailablebool
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.
booltrue if the next available tab was found and selected.
SelectPreviousAvailablebool
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.
booltrue if the previous available tab was found and selected.
SetAllTabsInFrontvoid
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.
| Name | Type | Default |
|---|---|---|
isFront | bool | — |
isFrontLegacy 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
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.
| Name | Type | Default |
|---|---|---|
clipTabs | bool | — |
clipTabsConstrain 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
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
SetDeselectEnabledvoid
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.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledAllows 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
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.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledAllows user drag-to-reorder, default false. Does not prevent code-driven MoveChild. For transfers between containers also configure matching TabsRearrangeGroup values.
SetPopupvoid
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.
| Name | Type | Default |
|---|---|---|
popup | Entity | — |
popupAssigns 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
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.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledSwitch 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
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.
| Name | Type | Default |
|---|---|---|
alignment | TabBar.AlignmentMode | — |
alignmentHeader alignment Left/Center/Right, default Left. Affects the internal TabBar and theme margins rather than page content. Layout direction is handled separately.
SetTabButtonIconvoid
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
icon | Texture2D | — |
tabIdxCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
iconSets 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
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
disabled | bool | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
disabledPrevents 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
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.
| Name | Type | Default |
|---|---|---|
focusMode | Control.FocusModeEnum | — |
focusModeFocusMode of the internal strip, default All. None disables header focus without changing FocusMode of buttons/fields within pages.
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
hidden | bool | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
hiddenHides/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
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
icon | Texture2D | — |
tabIdxCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
iconAssigns 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
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
width | int | — |
tabIdxCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
widthMaximum 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
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
metadata | Variant | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
metadataStores 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
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.
| Name | Type | Default |
|---|---|---|
tabSizing | TabBar.SizingMode | — |
tabSizingHeader-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
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.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
title | string | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
titleSets the header text without renaming the page Control. A custom title survives page renames; assigning the current Name restores name tracking.
SetTabTooltipvoid
public void SetTabTooltip(int tabIdx, string tooltip);Sets the header tooltip without changing title, name or index. Requires an existing tab.
| Name | Type | Default |
|---|---|---|
tabIdx | int | — |
tooltip | string | — |
tabIdxTab index 0…GetTabCount()-1; SetCurrentTab accepts -1 when deselection is allowed. GetTabControl returns null for an absent index.
tooltipSets the header tooltip without changing title, name or index. Requires an existing tab.
SetTabsPositionvoid
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.
| Name | Type | Default |
|---|---|---|
tabsPosition | TabContainer.TabPosition | — |
tabsPositionTab 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
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.
| Name | Type | Default |
|---|---|---|
groupId | int | — |
groupIdCross-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
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.
| Name | Type | Default |
|---|---|---|
visible | bool | — |
visibleShow the header strip, default true. false removes the strip and its layout space while retaining the selected page and index.
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.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledInclude 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
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.
| Name | Type | Default |
|---|---|---|
idxTo | long | — |
idxToNew tab index after the drag operation.
PrePopupPressedEvent
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
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.
| Name | Type | Default |
|---|---|---|
tab | long | — |
tabCurrent tab index 0…GetTabCount()-1 rather than a stable ID.
TabChangedEvent
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.
| Name | Type | Default |
|---|---|---|
tab | long | — |
tabTab index at event time; selection/change can use -1 for no page.
TabClickedEvent
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.
| Name | Type | Default |
|---|---|---|
tab | long | — |
tabTab index at event time; selection/change can use -1 for no page.
TabHoveredEvent
public event TabContainer.TabHoveredEventHandler TabHovered;Pointer hovered over the specified tab header. Not page selection or a CurrentTab change notification.
| Name | Type | Default |
|---|---|---|
tab | long | — |
tabTab index at event time; selection/change can use -1 for no page.
TabSelectedEvent
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.
| Name | Type | Default |
|---|---|---|
tab | long | — |
tabTab index at event time; selection/change can use -1 for no page.
TabContainer.TabPosition
| Value | Description |
|---|---|
Bottom = 1 | Places the tab bar at the bottom. The tab bar's |
Max = 2 | Represents the size of the |
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 type | Description |
|---|---|
drop_mark_colorColor | Modulation color for the Color(1, 1, 1, 1) |
font_disabled_colorColor | Font color of disabled tabs. Default:Color(0.875, 0.875, 0.875, 0.5) |
font_hovered_colorColor | 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_colorColor | The tint of text outline of the tab name. Default:Color(0, 0, 0, 1) |
font_selected_colorColor | Font color of the currently selected tab. Default:Color(0.95, 0.95, 0.95, 1) |
font_unselected_colorColor | Font color of the other, unselected tabs. Default:Color(0.7, 0.7, 0.7, 1) |
icon_disabled_colorColor | Icon color of disabled tabs. Default:Color(1, 1, 1, 1) |
icon_hovered_colorColor | Icon color of the currently hovered tab. Does not apply to the selected tab. Default:Color(1, 1, 1, 1) |
icon_selected_colorColor | Icon color of the currently selected tab. Default:Color(1, 1, 1, 1) |
icon_unselected_colorColor | Icon color of the other, unselected tabs. Default:Color(1, 1, 1, 1) |
icon_max_widthint | 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 0 |
icon_separationint | Space between tab's name and its icon. Default:4 |
outline_sizeint | The size of the tab text outline.
Note: If using a font with 0 |
side_marginint | The space at the left or right edges of the tab bar, accordingly with the current 8 |
tab_separationint | The space between tabs in the tab bar. Default:0 |
fontFont | The font used to draw tab names. |
font_sizeint | Font size of the tab names. |
decrementTexture2D | 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_highlightTexture2D | 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_markTexture2D | Icon shown to indicate where a dragged tab will be dropped (see |
incrementTexture2D | 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_highlightTexture2D | 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. |
menuTexture2D | The icon for the menu button (see |
menu_highlightTexture2D | The icon for the menu button (see |
drag_ended_soundAudioStream | Played when a tab is done being dragged to rearrange it. Can only be heard if |
drag_started_soundAudioStream | Played when a tab is beginning to be dragged to rearrange it. Can only be heard if |
focus_soundAudioStream | Played when this |
hover_soundAudioStream | Played when a tab is hovered with the mouse. |
pressed_disabled_soundAudioStream | 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_soundAudioStream | Played when the tab close or previous/next tab navigation buttons are pressed. |
panelStyleBox | The style for the background fill. |
tab_disabledStyleBox | The style of disabled tabs. |
tab_focusStyleBox |
|
tab_hoveredStyleBox | The style of the currently hovered tab.
Note: This style will be drawn with the same width as |
tab_selectedStyleBox | The style of the currently selected tab. |
tab_unselectedStyleBox | The style of the other, unselected tabs. |
tabbar_backgroundStyleBox | The style for the background fill of the |