ShortSeparator Constructor

Syntax

PP.Ui.ShortSeparator(settings)

Parameters

settings. JSON object that contains values of component properties.

Description

The ShortSeparator constructor creates an instance of the ShortSeparator class.

Example

To execute the example, the <head> tag of HTML page must include links to the PP.js script file and the PP.css styles file and the example itself must be placed within the <script> tag. Create menu with two items and separator in between and display it:

function createRoundButton() {
    // Create a menu
    menu = new PP.Ui.Menu();
    // Create menu items
    var item1 = new PP.Ui.MenuItem({
        Content: "item 1"
    });
    var item2 = new PP.Ui.MenuItem({
        Content: "Item 2"
    });
    // Create a short separator
    var sep = new PP.Ui.ShortSeparator();
    // Add menu items and separator in between
    menu.addItem(item1);
    menu.addItem(sep);
    menu.addItem(item2);
    // Show menu
    menu.show(20, 12);
}

As a result, the menu with two items and a short separator in between will be added on the page:

See also:

ShortSeparator