TabContainer
Inherits: Control < CanvasItem < Node < Object
Category: Core
Brief Description
Tabbed Container.
Member Functions
bool | are_tabs_visible ( ) const |
int | get_current_tab ( ) const |
Control | get_current_tab_control ( ) const |
Popup | get_popup ( ) const |
int | get_previous_tab ( ) const |
int | get_tab_align ( ) const |
Control | get_tab_control ( int idx ) const |
int | get_tab_count ( ) const |
Texture | get_tab_icon ( int tab_idx ) const |
String | get_tab_title ( int tab_idx ) const |
void | set_current_tab ( int tab_idx ) |
void | set_popup ( Popup popup ) |
void | set_tab_align ( int align ) |
void | set_tab_icon ( int tab_idx, Texture icon ) |
void | set_tab_title ( int tab_idx, String title ) |
void | set_tabs_visible ( bool visible ) |
Signals
- pre_popup_pressed ( )
- tab_changed ( int tab )
Emitted when a tab gets selected. Same behavior as tab_selected signal for backward compatibility. Note: In Godot v3.0+ this will change to be only emitted when tab gets changed.
- tab_selected ( int tab )
Emitted when a tab is being selected, even if it is the same tab.
Description
Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one.
Children controls of this one automatically.
Member Function Description
bool are_tabs_visible ( ) const
Return whether the tabs should be visible or hidden.
int get_current_tab ( ) const
Return the current tab index that is being shown.
Control get_current_tab_control ( ) const
Return the current tab control that is being shown.
Popup get_popup ( ) const
int get_previous_tab ( ) const
Return the previous tab index that was being shown.
int get_tab_align ( ) const
Return tab alignment, from the ALIGN_* enum.
Control get_tab_control ( int idx ) const
int get_tab_count ( ) const
Return the amount of tabs.
Texture get_tab_icon ( int tab_idx ) const
String get_tab_title ( int tab_idx ) const
Return the title for the tab. Tab titles are by default the children node name, but this can be overridden.
void set_current_tab ( int tab_idx )
Bring a tab (and the Control it represents) to the front, and hide the rest.
void set_popup ( Popup popup )
void set_tab_align ( int align )
Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center.
void set_tab_icon ( int tab_idx, Texture icon )
Set an icon for a tab.
void set_tab_title ( int tab_idx, String title )
Set a title for the tab. Tab titles are by default the children node name, but this can be overridden.
void set_tabs_visible ( bool visible )
Set whether the tabs should be visible or hidden.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_tabcontainer.html