DHTMLX Docs & Samples Explorer

Index
dhtmlxtoolbar
API Methods

## dhtmlxToolbar API Methods

### Common

#### Init

- dhtmlXToolbarObject constructor
- unload destructor
- clearAll removes all items from toolbar

#### Skinning/Icons

- setSkin sets skin on the fly
- setIconsPath sets path to used images
- setIconPath alias of setIconsPath

#### Data Loading

- loadXML loads data to object from xml file
- loadXMLString loads data to object from xml string

#### 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

- attachEvent attaches an event handler to webbar
- checkEvent returns true if event exists
- detachEvent removes an event handler

### Text

- addText adds a text item to webbar

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

- enableItem enables a specified item
- disableItem disables a specified item
- isEnabled returns true if a specified item is enabled

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

### Button

- addButton adds a button to webbar

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

- enableItem enables a specified item
- disableItem disables a specified item
- isEnabled returns true if a specified item is enabled

- setItemText sets new text for an item
- getItemText returns cureent item's text

- setItemImage sets an image for an item in enabled state
- setItemImageDis sets an image for an item in disabled state
- clearItemImage removes an image of an item in enabled state
- clearItemImageDis removes an image of an item in disabled state

- setItemToolTip sets a tooltip for an item
- getItemToolTip returns current item's tooltip

### Select Button

- addButtonSelect adds a select button to webbar

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

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

- enableItem enables a specified item
- disableItem disables a specified item
- isEnabled returns true if a specified item is enabled

- setItemText sets new text for an item
- getItemText returns cureent item's text

- setItemImage sets an image for an item in enabled state
- setItemImageDis sets an image for an item in disabled state
- clearItemImage removes an image of an item in enabled state
- clearItemImageDis removes an image of an item in disabled state

- setItemToolTip sets a tooltip for an item
- getItemToolTip returns current item's tooltip

#### List Option

- addListOption adds a listed option to a select button
- removeListOption completely removes a listed option from a select button

- 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

- showListOption shows a listed option
- hideListOption hides a listed option
- isListOptionVisible returns true if a listed option is visible

- enableListOption enables a listed option
- disableListOption disables a listed option
- isListOptionEnabled returns true if a listed option is enabled

- setListOptionPosition sets a position of a listed option (moves listed option)
- getListOptionPosition returns a position of a listed option

- setListOptionImage sets an image for a listed option
- getListOptionImage returns an image of a listed option
- clearListOptionImage removes an image (if exists) of a listed option

- setListOptionText sets a text for a listed option
- getListOptionText returns a text of a listed option

- setListOptionToolTip sets a tooltip for a listed option
- getListOptionToolTip returns a tooltip of a listed option

- setListOptionSelected sets listed option selected
- getListOptionSelected returns selected listed option

### Two-State Button

- addButtonTwoState adds a two-state button to webbar

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

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

- enableItem enables a specified item
- disableItem disables a specified item
- isEnabled returns true if a specified item is enabled

- setItemText sets new text for an item
- getItemText returns cureent item's text

- setItemImage sets an image for an item in enabled state
- setItemImageDis sets an image for an item in disabled state
- clearItemImage removes an image of an item in enabled state
- clearItemImageDis removes an image of an item in disabled state

- setItemToolTip sets a tooltip for an item
- getItemToolTip returns current item's tooltip

### Input

- addInput adds an input item to webbar

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

- enableItem enables a specified item
- disableItem disables a specified item
- isEnabled returns true if a specified item is enabled

- 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

- setItemToolTip sets a tooltip for an item
- getItemToolTip returns current item's tooltip

### Separator

- addSeparator adds a separator to webbar

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

### Slider

- addSlider adds a slider to webbar

- showItem shows a specified item
- hideItem hides a specified item
- isVisible returns true if a specified item is visible

- enableItem enables a specified item
- disableItem disables a specified item
- isEnabled returns true if a specified item is enabled

- 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

- setItemToolTipTemplate sets a tooltip template for a slider
- getItemToolTipTemplate returns a current tooltip template of a slider