Master.addMaster

Syntax

addMaster (master: PP.Ui.Master, beforeItem: PP.Ui.NavigationItem);

Parameters

master. Master which panels are to be added.

beforeItem. Item before which the panels are inserted. If it is empty, the panels are added to the end.

Description

The addMaster method adds a child master.

Example

To execute the example, the page must contain a master named master (see Master Constructor). Add a button clicking which adds a child master:

var newMaster = new PP.Ui.Master(//child master
{
    Items: [
    {
        Title: "New Panel 1"
    },
    {
        Title: "New Panel 2"
    }]
});
var butAdd = new PP.Ui.Button(//button to add a child master
{
    Content: "Add Master",
    ParentNode: document.body,
    Click: function ()
    {
        master.addMaster(newMaster)
    }
});

After executing the example the Add Master button is placed on the page. Clicking the button adds a master that has two tabs to the component:

See also:

Master