Assigned new w2toolbar object to a panel
assignToolbar(panel, toolbar)

panel | string, name of the panel
toolbar | string or object, toolbar to assign

#### Description

The first argument panel is the name of the panel. It can be one of the following:

- top
- left
- main
- right
- preview
- bottom

Initially you can set a toolbar object for the panel when you initialize it in the following way: $('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'main', content: 'This is main panel', toolbar: { items: [ { type: 'button', caption: 'Some button'} ], onClick: function (event) { ... } } }, { type: 'preview', size: 200 } ] }); However, if you already have a w2toolbar object created, you can assign it to the panel with assignToolbar methods. If second argument toolbar is a string, it will look for toolbar in the global w2ui object. layout.assignToolbar('main', 'myToolbar');