class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeCanvasItemControlContainer TabContainer
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.

active_tab_rearranged active_tab_rearranged<>( int idx_to=, idx_to:int=, ):active_tab_rearranged

Emitted when the active tab is rearranged via mouse drag. See drag_to_rearrange_enabled.

pre_popup_pressed pre_popup_pressed<>():pre_popup_pressed

Emitted when the TabContainer's Popup button is clicked. See set_popup for details.

tab_button_pressed tab_button_pressed<>( int tab=, tab:int=, ):tab_button_pressed

Emitted when the user clicks on the button icon on this tab.

tab_changed tab_changed<>( int tab=, tab:int=, ):tab_changed

Emitted when switching to another tab.

tab_clicked tab_clicked<>( int tab=, tab:int=, ):tab_clicked

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

tab_hovered tab_hovered<>( int tab=, tab:int=, ):tab_hovered

Emitted when a tab is hovered by the mouse.

tab_selected tab_selected<>( int tab=, tab:int=, ):tab_selected

Emitted when a tab is selected via click, directional input, or script, even if it is the current tab.

Enum TabPosition<>():Enum

POSITION_TOP = 0

Places the tab bar at the top.


POSITION_BOTTOM = 1

Places the tab bar at the bottom. The tab bar's StyleBox will be flipped vertically.


POSITION_MAX = 2

Represents the size of the TabPosition enum.

bool all_tabs_in_front<>():bool

If true, all tabs are drawn in front of the panel. If false, inactive tabs are drawn behind the panel.

bool clip_tabs<>():bool

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.

int current_tab<>():int

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.

bool deselect_enabled<>():bool

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.

bool drag_to_rearrange_enabled<>():bool

If true, tabs can be rearranged with mouse drag.

AlignmentMode tab_alignment<>():AlignmentMode

Sets the position at which tabs will be placed. See AlignmentMode for details.

FocusMode tab_focus_mode<>():FocusMode

The focus access mode for the internal TabBar node.

TabPosition tabs_position<>():TabPosition

Sets the position of the tab bar. See TabPosition for details.

int tabs_rearrange_group<>():int

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.

bool tabs_visible<>():bool

If true, tabs are visible. If false, tabs' content and titles are hidden.

bool use_hidden_tabs_for_min_size<>():bool

If true, children Control nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.

Control get_current_tab_control<>():Control

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

Popup get_popup<>():Popup

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.

int get_previous_tab<>():int

Returns the previously active tab index.

TabBar get_tab_bar<>():TabBar

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.

Texture2D get_tab_button_icon<>( int tab_idx=, tab_idx:int=, ):Texture2D

Returns the button icon from the tab at index tab_idx.

Control get_tab_control<>( int tab_idx=, tab_idx:int=, ):Control

Returns the Control node from the tab at index tab_idx.

int get_tab_count<>():int

Returns the number of tabs.

Texture2D get_tab_icon<>( int tab_idx=, tab_idx:int=, ):Texture2D

Returns the Texture2D for the tab at index tab_idx or null if the tab has no Texture2D.

int get_tab_idx_at_point<>( Vector2 point=, point:Vector2=, ):int

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.

int get_tab_idx_from_control<>( Control control=, control:Control=, ):int

Returns the index of the tab tied to the given control. The control must be a child of the TabContainer.

Variant get_tab_metadata<>( int tab_idx=, tab_idx:int=, ):Variant

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.

String get_tab_title<>( int tab_idx=, tab_idx:int=, ):String

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.

bool is_tab_disabled<>( int tab_idx=, tab_idx:int=, ):bool

Returns true if the tab at index tab_idx is disabled.

bool is_tab_hidden<>( int tab_idx=, tab_idx:int=, ):bool

Returns true if the tab at index tab_idx is hidden.

bool select_next_available<>():bool

Selects the first available tab with greater index than the currently selected. Returns true if tab selection changed.

bool select_previous_available<>():bool

Selects the first available tab with lower index than the currently selected. Returns true if tab selection changed.

void set_popup<>( Node popup=, popup:Node=, ):void

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.

void set_tab_button_icon<>( int tab_idx=, tab_idx:int=, Texture2D icon=, icon:Texture2D=, ):void

Sets the button icon from the tab at index tab_idx.

void set_tab_disabled<>( int tab_idx=, tab_idx:int=, bool disabled=, disabled:bool=, ):void

If disabled is true, disables the tab at index tab_idx, making it non-interactable.

void set_tab_hidden<>( int tab_idx=, tab_idx:int=, bool hidden=, hidden:bool=, ):void

If hidden is true, hides the tab at index tab_idx, making it disappear from the tab area.

void set_tab_icon<>( int tab_idx=, tab_idx:int=, Texture2D icon=, icon:Texture2D=, ):void

Sets an icon for the tab at index tab_idx.

void set_tab_metadata<>( int tab_idx=, tab_idx:int=, Variant metadata=, metadata:Variant=, ):void

Sets the metadata value for the tab at index tab_idx, which can be retrieved later using get_tab_metadata.

void set_tab_title<>( int tab_idx=, tab_idx:int=, String title=, title:String=, ):void

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.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...