TabControl.clear

Syntax

clear ()

Description

The clear method removes all tabs of a component.

Example

To execute the example, the page must contain the TabControl component named tabcontrol (see Example of creating the TabControl component). Add the button clicking which deletes all component's tabs and changes color of the panels that house tabs' headings:

var but1 = new PP.Ui.Button(

{

    ParentNode: document.body,

    Content: "Clear",

    Click: function ()

    {

        tabcontrol.clear();

        tabcontrol.setBackground(new PP.Color(255, 218, 185))

    }

})

After executing the example on clicking the Clear button all the tabs are deleted and the color of the panel where these tabs were located is changed:

See also:

TabControl