DHTMLX Docs & Samples Explorer

Index
dhtmlxtoolbar
API Methods

## List of initialization properties

### Common initialization options

- parent - string or object, id of container, where tree will be initialized, mandatory
- skin - {string} define skin of toolbar

- icon_path - {string} defines an url where necessary user embedded icons are located (setIconsPath)
- xml - {string}, url of data xml file (loadXML)

### Toolbar's items

Toolbar's items can be defined through items collection

    toolbar = new dhtmlXToolbarObject({
    		parent:"a_menu",
    		items:[
                            {id:"save", text:"Save item"},
                            {id:"delete", text:"Delete item"}
                    ]
    	});

Each item can have next attributes

- id - {string} id of menu item
- text - {string} caption of menu item
- img - {sting} url of image related to menu item
- img_disabled - {sting} url which will be used for item in disabled state

### Events

any event can be assigned by using property equal to event name

    	toolbar = new dhtmlXToolbarObject({
    		parent:"a_toolbar",
    		onClick:function(){
    			alert("Item was clicked");
    		}
    	});