SplitMenuItem Constructor

Syntax

PP.Ui.SplitMenuItem(settings)

Parameters

settings. JSON object that contains values of class instance properties.

Description

The SplitMenuItem constructor creates an instance of the SplitMenuItem class.

Example

To execute the example, add links to the PP.css and PP.js files on the HTML page. The icon named picture.png must be positioned in the same level with the page. In the SCRIPT tag add the code that places the SplitButton component, and add a menu item to the component:

var splitBut = new PP.Ui.SplitButton({
      ParentNode: document.body,
      Content: "Picture",
      ImageUrl: "picture.png"
   });
menu = splitBut.getMenu();
menu.addItem(new PP.Ui.SplitMenuItem({
         Content: "Item 1"
      }));

After executing the example a button consisting of two parts is added to the page. Clicking the bottom part of the button opens a menu consisting of a single item:

See also:

SplitMenuItem