DHTMLX Docs & Samples Explorer

dhtmlxToolbar API Methods

Common

Init

Skinning/Icons

Data Loading

Positioning

  • setPosition sets a new position for an item (moves item to desired position)
  • getPosition returns a current position of an item

Common

  • forEachItem iterator, calls user handler for each item
  • getType returns item type by item id
  • setRTL enables rtl mode for toolbar
  • removeItem completely removes an item for a webbar

Events

Text

  • addText adds a text item to webbar
  • setWidth sets a width for an text/input/buttonSelect item

Button

Select Button

  • setWidth sets a width for an text/input/buttonSelect item

List Option

  • getAllListOptions returns array with ids of all listed options for parentId
  • getTypeExt returns extended item type by item id (button select node)
  • forEachListOption calls user defined handler for each listed option of parentId

Two-State Button

  • setItemState sets a pressed/released state for a two-state button
  • getItemState returns current state of a two-state button

Input

  • setValue sets a value for a slider or an input item
  • getValue returns a current value of a slider or an input item
  • setWidth sets a width for an text/input/buttonSelect item
  • getWidth returns a current width of an input item

Separator

Slider

  • setValue sets a value for a slider or an input item
  • getValue returns a current value of a slider or an input item
  • setMaxValue sets maximal value and label for a slider
  • getMaxValue returns current maximal value and label of a slider
  • setMinValue sets minimal value and label for a slider
  • getMinValue returns current minimal value and label of a slider