SelectButton

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

Adding SelectButton

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

sidebar.data.add({
    id:"select",
    type:"selectButton",
    icon:"dxi dxi-some",
    items:[]
});

Attributes

The selectButton object has the following properties:

  • type - (string) the type of a control, set it to "selectButton"
  • id - (string) the id of a control, auto-generated if not set
  • icon - (string) the name of an icon from the used icon font
  • value - (string) a value of the button
  • items - (array) an array of nested controls
  • size - (string) defines the size of a button: "small"|"medium"
  • tooltip - (string) a tooltip for the control

Operations with a button

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

Back to top