DHTMLX Docs & Samples Explorer

Index
dhtmlxlayout
Dhtmlxlayout Initialization

# Window-based Initialization

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

1. Create a dhtmlxWindows object:

    var dhxWins = new dhtmlXWindows();
    var layoutWin = dhxWins.createWindow("w1", 20, 20, 600, 400);

The following parameters should be passed to dhxWins.createWindow():

- w1 - the id of the window;
- 20, 20 - the left and the top positions of the window;
- 600, 400 - the width and the height of the window.

2. Add the following code to pass a window object into the layout constructor.

    var dhxLayout = new dhtmlXLayoutObject(layoutWin, "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'.