Check documentation for the latest version of dhtmlxSuite Common Operations with Items DHTMLX Docs

Common Operations with Items

Setting Size of Icons

To set the size of icons in the Toolbar (all icons at once) you should use method setIconSize().

myToolbar.setIconSize(24);

Possible values:

  • 18px (default);
  • 24px;
  • 32px;
  • 48px.

Related sample:  Icons size

Setting/Getting Position and Getting Type

The following methods can be applied to any item in the toolbar:

myToolbar.setPosition(itemId, pos);
 
var position = myToolbar.getPosition(itemId); // returns current item's position
var itemType = myToolbar.getType(itemId); // returns item's type

Removing Items

A simple tool for item's removal from the toolbar is removeItem() method:

myToolbar.removeItem(itemId);
Back to top