Splitter.collapse

Syntax

collapse ()

Description

The collapse method collapses left or top panel of the Splitter component.

Comments

If horizontal panel layout is selected, the left panel is collapsed. If the vertical layout is used, the method collapses the top panel.

Use theSplitter.expand method to shows a hidden panel.

Example

To execute the example, the page must contain the Splitter component named splitter (see Example of Creating the Splitter Component). Hide buttons clicking which hides and shows left panel of the component:

var butCollapse = new PP.Ui.Button(
{
    ParentNode: document.getElementById("but1"),
    Click: function ()
    {
        splitter.collapse();
        alert(splitter.getCollapsed())
    },
    Content: "Collapse"
})
var butExpand = new PP.Ui.Button(
{
    ParentNode: document.getElementById("but2"),
    Click: function ()
    {
        splitter.expand()
    },
    Content: "Expand"
})

After executing the example clicking the Collapse button collapses the left panel:

A message that contains index of the collapsed panel appears on the screen.

On clicking the Expand button the left panel returns to initial position:

See also:

Splitter