DHTMLX Docs & Samples Explorer

Index
dhtmlxlayout
Dhtmlxlayout Initialization

# Object-based Initialization

If you want to carry out object-based initialization - make the following steps:

1. Create an object where dhtmlxLayout will be placed later.

    <div id="parentId" style="position:absolute; width:600px; height:400px;"></div>

2. Create a new dhtmlXLayoutObject and place it after the <div> element (object) that you've just created.
Subject to the first argument, initialization can be done by means of an objectId:

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

or an object:

    var obj = document.getElementById("parentId");
    var dhxLayout = new dhtmlXLayoutObject(obj, "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'.