IsToggle: Boolean
The IsToggle property determines whether the button is a checkbox.
If the True value is set, the button is the checkbox that means that the selection remains after pushing the button. The False value is set by default, that means that the checkbox selection is not saved on clicking the button.
To execute the example, the HTML page must contain the ToolBar component named toolBar and the ImageList component that refers to the ui-icons_222222_256x240.png file containing a collection of icons (see Example of Creating the ToolBar Component).
//Create checkbox buttons:
var ubtn = new PP.Ui.ToolBarButton({
ToolTip: "Underlined",
RowIndex: 0,
ColumnIndex: 13,
Parent: toolBar,
IsToggle: true
});
var bbtn = new PP.Ui.ToolBarButton({
ToolTip: "Bold",
RowIndex: 0,
ColumnIndex: 14,
Parent: toolBar,
IsToggle: true
});
var ibtn = new PP.Ui.ToolBarButton({
ToolTip: "Italic",
RowIndex: 0,
ColumnIndex: 15,
Parent: toolBar,
IsToggle: true
});
//Add checkbox buttons:
toolBar.addItem(bbtn);
toolBar.addItem(ibtn);
toolBar.addItem(ubtn);
After executing the example checkbox buttons are placed on the toolbar:
Several buttons can be selected at the same time:
See also: