Tabbed Container.
    public class TabContainer : Control

Sets the active tab’s visible property to the value true. Sets all other children’s to false.

Ignores non-Control children.

Individual tabs are always visible unless you use SetTabDisabled(int, bool) and SetTabTitle(int, string) to hide it.

To hide only a tab’s content, nest the content inside a child Control, so it receives the TabContainer’s visibility setting instead.

Inheritance Chain


    public TabContainer()


    "pre_popup_pressed" ()

Emitted when the TabContainer’s Popup button is clicked. See SetPopup(Godot.Node) for details.

    "tab_changed" (int tab)

Emitted when switching to another tab.

    "tab_selected" (int tab)

Emitted when a tab is selected, even if it is the current tab.


    public int CurrentTab { get; set; }

The current tab index. When set, this index’s Control node’s visible property is set to true and all others are set to false.

    public TabAlignEnum TabAlign { get; set; }

The alignment of all tabs in the tab container. See the ALIGN_* constants for details.

    public bool TabsVisible { get; set; }

If true tabs are visible. If false tabs’ content and titles are hidden. Default value: true.


    public bool AreTabsVisible()

Getter for TabsVisible

    public int GetCurrentTab()

Getter for CurrentTab

    public Control GetCurrentTabControl()

Returns the child Control node located at the active tab index.

    public Popup GetPopup()

Returns the Popup node instance if one has been set already with SetPopup(Godot.Node).

    public int GetPreviousTab()

Returns the previously active tab index.

    public TabAlignEnum GetTabAlign()

Getter for TabAlign

    public Control GetTabControl(int idx)

Returns the currently visible tab’s Control node.

    public int GetTabCount()

Returns the number of tabs.

    public bool GetTabDisabled(int tabIdx)

Returns true if the tab at index tabIdx is disabled.

    public Texture GetTabIcon(int tabIdx)

Returns the Texture for the tab at index tabIdx or null if the tab has no Texture.

    public string GetTabTitle(int tabIdx)

Returns the title of the tab at index tabIdx. Tab titles default to the name of the indexed child node, but this can be overridden with SetTabTitle(int, string).

    public void SetCurrentTab(int tabIdx)

Setter for CurrentTab

    public void SetPopup(Node popup)

If set on a Popup node instance, a popup menu icon appears in the top-right corner of the TabContainer. Clicking it will expand the Popup node.

    public void SetTabAlign(TabAlignEnum align)

Setter for TabAlign

    public void SetTabDisabled(int tabIdx, bool disabled)

If disabled is false, hides the tab at index tabIdx. Note that its title text will remain, unless also removed with SetTabTitle(int, string).

    public void SetTabIcon(int tabIdx, Texture icon)

Sets an icon for the tab at index tabIdx.

    public void SetTabsVisible(bool visible)

Setter for TabsVisible

    public void SetTabTitle(int tabIdx, string title)

Sets a title for the tab at index tabIdx. Tab titles default to the name of the indexed child node, but this can be overridden with SetTabTitle(int, string).

Inner Types


Name Value Description
Left 0  
Center 1  
Right 2