SplitButton.getColumnIndex

Syntax

getColumnIndex ()

Description

The getColumnIndex method returns index of the column with the icon selected from the sprite property.

Comments

Index of the column that contains icon can be set in the ColumnIndex property from the constructor.

Example

To execute the example, add links to PP.js library and to PP.css visual styles. In the BODY tag add a DIV item with the splitButton identifier. The sprite named GlbClsImg16.png must be available. In the SCRIPT tag add code that creates SplitButton component:

    var splitButton = new PP.Ui.SplitButton({
        ImageUrl: "../PP_img/paste.png",
        Content: "Folders",
        ImageList: new PP.ImageList({ Source: "../PP_img/metabase/GlbClsImg16.png", IconWidth: 16, IconHeight: 16 }),
        ColumnIndex: 0,
        RowIndex: 0,
        ParentNode: document.getElementById("splitBut"),
        IsHorizontal: true
    });
    splitButton.setMenuDropPosition(PP.LTRB.Right);

After executing the example the SplitButton component is placed on the page:

Horizontal positioning is selected for the button: the icon and the label are shown in the same line. The arrow is directed to the right. Button icon is selected from sprite.

See also:

SplitButton