A container that creates a tab for each child control, displaying only the active tab's control.
Arranges child controls into a tabbed view, creating a tab for each one. The active tab's corresponding control is made visible, while all other child controls are hidden. Ignores non-control children.
Note: The drawing of the clickable tabs is handled by this node; TabBar is not needed.
If true, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
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.
A value of -1 means that no tab is selected.
If true, all tabs can be deselected so that no tab is selected. Click on the current_tab to deselect it.
Only the tab header will be shown if no tabs are selected.
If true, hovering over a tab while dragging something will switch to that tab. Does not have effect when hovering another tab to rearrange.
TabContainers with the same rearrange group ID will allow dragging the tabs between them. Enable drag with drag_to_rearrange_enabled.
Setting this to -1 will disable rearranging between TabContainers.
Returns the child Control node located at the active tab index.
Returns the Popup node instance if one has been set already with set_popup().
Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their Window.visible property.
Returns the TabBar contained in this container.
Warning: This is a required internal node, removing and freeing it or editing its tabs may cause a crash. If you wish to edit the tabs, use the methods provided in TabContainer.
Returns the Control node from the tab at index tab_idx.
Returns the index of the tab at local coordinates point. Returns -1 if the point is outside the control boundaries or if there's no tab at the queried position.
Returns the index of the tab tied to the given control. The control must be a child of the TabContainer.
Returns the metadata value set to the tab at index tab_idx using set_tab_metadata(). If no metadata was previously set, returns null by default.
Returns the title of the tab at index tab_idx. Tab titles default to the name of the indexed child node, but this can be overridden with set_tab_title().
Selects the first available tab with greater index than the currently selected. Returns true if tab selection changed.
Selects the first available tab with lower index than the currently selected. Returns true if tab selection changed.
If set on a Popup node instance, a popup menu icon appears in the top-right corner of the TabContainer (setting it to null will make it go away). Clicking it will expand the Popup node.
Sets the maximum allowed width of the icon for the tab at index tab_idx. This limit is applied on top of the default size of the icon and on top of icon_max_width. The height is adjusted according to the icon's ratio.
Sets the metadata value for the tab at index tab_idx, which can be retrieved later using get_tab_metadata().
Sets a custom title for the tab at index tab_idx (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
Sets a custom tooltip text for tab at index tab_idx.
Note: By default, if the tooltip is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign " " as the tooltip text.
Emitted when the active tab is rearranged via mouse drag. See drag_to_rearrange_enabled.
Emitted when the TabContainer's Popup button is clicked. See set_popup() for details.
Emitted when a tab is selected via click, directional input, or script, even if it is the current tab.
POSITION_TOP = 0Places the tab bar at the top.
POSITION_BOTTOM = 1Places the tab bar at the bottom. The tab bar's StyleBox will be flipped vertically.
POSITION_MAX = 2Represents the size of the TabPosition enum.