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

NameTypeDescription
TabIdstringThe id of the new tab.
tabTitlestringThe title of the new tab.
insertBeforeTabIdstringThe id of the tab before which the new tab should be inserted.
iconstringHeader 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 < IShellPaneTab >It returns MFCLIENTSCRIPT~ISHELLPANECONTAINER~ADDTAB.