Skip to content

tes3uiTabContainer⚓︎

A structure containing properties specific to tab containers.

This type inherits the following: tes3uiWidget.

Properties⚓︎

currentTab⚓︎

The ID of the currently selected tab. Setting this value will change to the tab associated with the ID.

Returns:

  • result (string)

element⚓︎

Access back to the element this widget interface is for.

Returns:


Methods⚓︎

addTab⚓︎

Creates a new tab in the container. This will add a tab button to the top of the element, as well as a new block for the contents, which will be returned.

local result = myObject:addTab({ id = ..., name = ... })

Parameters:

  • params (table)
    • id (string): The unique identifier for the tab.
    • name (string): Optional. The text used for the tab's selector button. If not provided, the ID will be used.

Returns:


getContentsBlock⚓︎

Gets the block that contains the tab contents used for this container. Should be used with care.

local result = myObject:getContentsBlock()

Returns:


getTab⚓︎

Gets the tab selector button with the given ID.

local tab = myObject:getTab(id)

Parameters:

  • id (string): The unique identifier for the tab.

Returns:


getTabContents⚓︎

Gets the contents block for the tab with the given ID.

local contents = myObject:getTabContents(id)

Parameters:

  • id (string): The unique identifier for the tab.

Returns:


getTabDisabled⚓︎

Gets whether the tab with the given ID is disabled.

local result = myObject:getTabDisabled(id)

Parameters:

  • id (string): The unique identifier for the tab.

Returns:

  • result (boolean)

getTabHidden⚓︎

Gets whether the tab with the given ID is hidden.

local result = myObject:getTabHidden(id)

Parameters:

  • id (string): The unique identifier for the tab.

Returns:

  • result (boolean)

getTabPosition⚓︎

Gets the one-based position of the tab with the given ID.

local position = myObject:getTabPosition(id)

Parameters:

  • id (string): The unique identifier for the tab.

Returns:

  • position (number, nil)

getTabsBlock⚓︎

Gets the block that contains the tab buttons used for this container. Should be used with care.

local result = myObject:getTabsBlock()

Returns:


nextTab⚓︎

Changes the currently selected tab to the next available one. If on the last tab, it will cycle back around to the first.

myObject:nextTab()

previousTab⚓︎

Changes the currently selected tab to the previous available one. If on the first tab, it will cycle back around to the last.

myObject:previousTab()

removeTab⚓︎

Removes the tab with the given ID and destroys its associated contents block. If the removed tab was selected, the next available tab will be selected.

myObject:removeTab(id)

Parameters:

  • id (string): The unique identifier for the tab.

setTabDisabled⚓︎

Sets whether the tab with the given ID is disabled. If the selected tab is disabled, the next available tab will be selected.

myObject:setTabDisabled(id, disabled)

Parameters:

  • id (string): The unique identifier for the tab.
  • disabled (boolean): If true, the tab will be disabled.

setTabHidden⚓︎

Sets whether the tab with the given ID is hidden. If the selected tab is hidden, the next available tab will be selected.

myObject:setTabHidden(id, hidden)

Parameters:

  • id (string): The unique identifier for the tab.
  • hidden (boolean): If true, the tab will be hidden.

setTabPosition⚓︎

Moves the tab with the given ID to a new one-based position. The associated contents block will be moved to the same position.

myObject:setTabPosition(id, position)

Parameters:

  • id (string): The unique identifier for the tab.
  • position (number): The one-based position to move the tab to.