A control that provides a horizontal bar with tabs.
A control that provides a horizontal bar with tabs. Similar to TabContainer but is only in charge of drawing tabs, not interacting with children.
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.
If true, middle-clicking on a tab will emit the tab_close_pressed signal.
The index of the current selected tab. A value of -1 means that no tab is selected and can only be set when deselect_enabled is true or if all tabs are hidden or disabled.
If true, all tabs can be deselected so that no tab is selected. Click on the current tab to deselect it.
If true, hovering over a tab while dragging something will switch to that tab. Does not have effect when hovering another tab to rearrange. The delay for when this happens is dictated by hover_switch_wait_msec.
TabBars 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 TabBars.
Returns true if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible.
Returns the icon for the right button of the tab at index tab_idx or null if the right button has no icon.
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 metadata value set to the tab at index tab_idx using set_tab_metadata(). If no metadata was previously set, returns null by default.
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.
Sets an icon for the button of the tab at index tab_idx (located to the right, before the close button), making it visible and clickable (See tab_button_pressed). Giving it a null value will hide the button.
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 language code of the title for the tab at index tab_idx to language. This is used for line-breaking and text shaping algorithms. If language is empty, the current locale is used.
Sets the metadata value for the tab at index tab_idx, which can be retrieved later using get_tab_metadata().
Sets a tooltip 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 a tab's right button is pressed. See set_tab_button_icon().
Emitted when a tab's close button is pressed or, if close_with_middle_mouse is true, when middle-clicking on a tab.
Note: Tabs are not removed automatically; this behavior needs to be coded manually. For example:
$TabBar.tab_close_pressed.connect($TabBar.remove_tab)Emitted when a tab is selected via click, directional input, or script, even if it is the current tab.
ALIGNMENT_LEFT = 0Aligns tabs to the left.
ALIGNMENT_CENTER = 1Aligns tabs in the middle.
ALIGNMENT_RIGHT = 2Aligns tabs to the right.
ALIGNMENT_MAX = 3Represents the size of the AlignmentMode enum.
CLOSE_BUTTON_SHOW_NEVER = 0Never show the close buttons.
CLOSE_BUTTON_SHOW_ACTIVE_ONLY = 1Only show the close button on the currently active tab.
CLOSE_BUTTON_SHOW_ALWAYS = 2Show the close button on all tabs.
CLOSE_BUTTON_MAX = 3Represents the size of the CloseButtonDisplayPolicy enum.