DHTMLX Docs & Samples Explorer

Index
dhtmlxlayout
Dhtmlxlayout Initialization

# Layout's Cell-based Initialization

This type of initialization means that some layout's cell will be made the parent for the newly created layout.

If you want to carry out this kind of initialization - make the following steps:

1. Create a new dhtmlXLayoutObject.

    var dhxLayout = new dhtmlXLayoutObject("parentId", "3L", "dhx_black");

- The second argument in dhtmlXLayoutObject() - the name of a layout's pattern.
- The third argument - the name of a layout's skin. It's optional. The default value - 'dhx_skyblue'.

2. When the dhtmlXLayoutObject will be created, specify its parent either through cells or through items:

    var Layout1 = new dhtmlXLayoutObject(dhxLayout.cells("a"), "2U");
      // OR
    var Layout1 = new dhtmlXLayoutObject(dhxLayout.items[1], "2U");