Skip to main content

AddTab

Description​

Creates a new tab and adds it to the collection of tabs.

Syntax​

// shellPaneContainer points to instance of IShellPaneContainer
const result = await shellPaneContainer.AddTab(
tabId,
tabTitle,
insertBeforeTabId,
icon,
);

Parameters​

NameOptionalityTypeDescription
tabIdRequiredstringThe id of the new tab.
tabTitleRequiredstringThe title of the new tab.
insertBeforeTabIdRequiredstringThe id of the tab before which the new tab should be inserted.
iconRequiredstringHeader tab image name.
Can refer to built-in tab or another custom-created tab. See Using Tabs
in Shell Frame Side Pane Tabs for a list of built-in tab identifiers.

Return type​

TypeDescription
Promise < null | IShellPaneTab >Returns the newly created tab, which is IShellPaneTab instance.

Exceptions​

ArgumentError - When tabId, tabTitle, or insertBeforeTabId is null or undefined.