SelectButton

This is a button that contains a drop-down list of options.

Related sample:  Toolbar. Select Button

Adding SelectButton

A new SelectButton can be created with the help of the add() method of Tree Collection:

toolbar.data.add(
    {
        id: "title",
        value: "Select count or use alt+num"
    },
    {
        id: "currentButton",
        type: "selectButton",
        value: "1",
        items: [
            {
                value: "1",
                hotkey: "alt+1"
            },
            {
                value: "2",
                hotkey: "alt+2"
            },
            {
                value: "3",
                hotkey: "alt+3"
            },
            {
                value: "4",
                hotkey: "alt+4"
            }
        ]
    }
);

Attributes

The selectButton object has the following properties:

Operations with a button

You can perform operations over the SelectButton control with the help of the available Toolbar API and Tree Collection API.

Back to top