TabControl.IsAddTabButtonVisible

Syntax

IsAddTabButtonVisible: Boolean

Description

The IsAddTabButtonVisible property determines whether to show tab used for adding new tabs.

Comments

If it is set to False the tab for adding new tabs is not shown. By default the property is set to True.

The tab for adding new tabs contains + in its heading. Clicking the tab adds a new tab titled New Tab:

Property value is set from JSON on component creation or using the setIsAddTabButtonVisible(value, position) method. Use the getIsAddTabButtonVisible method to get the property value.

Parameters of the setIsAddTabButtonVisible method:

value. Determines whether to show tab for adding new tabs.

position. Panel position where the tab for adding new tabs will show or hide. Enumeration item

Example

To execute the example, the page must contain the TabControl component named tabcontrol (see Example of Creating the TabControl Component). Add a button clicking which disables adding new tabs:

var but1 = new PP.Ui.Button(

{

    ParentNode: document.body,

    Content: "Hide adding tab",

    Click: function ()

    {

        tabcontrol.setIsAddTabButtonVisible (false);

    }

});

After executing the example the Hide Adding Tab button is added to the page. Clicking the button hides the tab used for adding new tabs.

See also:

TabControl