Methods of Toolbar
You can use the following Toolbar methods of Suite 8:
Name | Description |
---|---|
disable() | Disables and dims an item(s) of Toolbar |
enable() | Enables a disabled item(s) of Toolbar |
getSelected() | Returns an array with IDs of selected items |
getState() | Gets current values/states of controls |
hide() | Hides an item of Toolbar |
isDisabled() | Checks whether an item of Toolbar is disabled |
isSelected() | Checks whether a specified Toolbar item is selected |
paint() | Repaints Toolbar on a page |
select() | Selects a specified item of Toolbar |
setFocus() | Sets focus on an Input control by its ID |
setState() | Sets values/states of controls |
show() | Shows an item of Toolbar |
unselect() | Unselects a selected Toolbar item |
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
view: {
toolbar: true
}
});
// disables the "file" item
editor.toolbar.disable("$file");
// disables "file" and "scale" items
editor.toolbar.disable(["$file", "$scale"]);
// disables all items
editor.toolbar.disable();