Struct TabContainer
Tabbed container.
struct TabContainer
;
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
and setTabTitle
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.
Properties
Name | Type | Description |
---|---|---|
currentTab [get, set]
|
long | 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 .
|
dragToRearrangeEnabled [get, set]
|
bool | If true , tabs can be rearranged with mouse drag.
|
tabAlign [get, set]
|
TabContainer | The alignment of all tabs in the tab container. See the tabalign constants for details.
|
tabsVisible [get, set]
|
bool | If true , tabs are visible. If false , tabs' content and titles are hidden.
|
useHiddenTabsForMinSize [get, set]
|
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.
|
Methods
Name | Description |
---|---|
_childRenamedCallback
|
|
_guiInput
|
|
_onMouseExited
|
|
_onThemeChanged
|
|
_updateCurrentTab
|
|
areTabsVisible
|
|
getCurrentTab
|
|
getCurrentTabControl
|
Returns the child Control node located at the active tab index.
|
getDragToRearrangeEnabled
|
|
getPopup
|
Returns the Popup node instance if one has been set already with setPopup .
|
getPreviousTab
|
Returns the previously active tab index. |
getTabAlign
|
|
getTabControl
|
Returns the currently visible tab's Control node.
|
getTabCount
|
Returns the number of tabs. |
getTabDisabled
|
Returns true if the tab at index tab_idx is disabled.
|
getTabIcon
|
Returns the Texture for the tab at index tab_idx or null if the tab has no Texture .
|
getTabsRearrangeGroup
|
Returns the TabContainer rearrange group id.
|
getTabTitle
|
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 setTabTitle .
|
getUseHiddenTabsForMinSize
|
|
setCurrentTab
|
|
setDragToRearrangeEnabled
|
|
setPopup
|
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.
|
setTabAlign
|
|
setTabDisabled
|
If disabled is false , hides the tab at index tab_idx .
Note: Its title text will remain, unless also removed with setTabTitle .
|
setTabIcon
|
Sets an icon for the tab at index tab_idx .
|
setTabsRearrangeGroup
|
Defines rearrange group id, choose for each TabContainer the same value to enable tab drag between TabContainer . Enable drag with set_drag_to_rearrange_enabled(true) .
|
setTabsVisible
|
|
setTabTitle
|
Sets a title for the tab at index tab_idx . Tab titles default to the name of the indexed child node, but this can be overridden with setTabTitle .
|
setUseHiddenTabsForMinSize
|
Enums
Name | Description |
---|---|
Constants
|
|
TabAlign
|