Skip to main content

attach()

attaches a DHTMLX component into a Layout cell

attach(name: string | IViewFn | IView | IViewConstructor, config?: any): IViewLike;

Parameters:

  • component: string | object - the name or object of a component
  • config: object - optional, the configuration settings of a component

Returns:

The object of the attached component.

Example

var layout = new dhx.Layout({    width:"400px", height:"600px"});
var sidebar = new dhx.Sidebar(null, {    css: "dhx_widget--border_right dhx_widget--bg"});
layout.getCell("sidebar").attach(sidebar);

Related sample: Layout. Attach

note

The DHTMLX Message, Popup, Window components can't be attached to the Layout cell because these components can't have the parent container due to their architecture principles.