clear();
The clear method removes all tabs of a component.
Executing the example requires that the page contains 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, clicking the Clear button deletes all the tabs and changes the color of the panel where these tabs were located:
See also: