DHTMLX Docs & Samples Explorer

Fullscreen Initialization

If you want to carry out fullscreen initialization - create a new dhtmlXLayoutObject with the following arguments:

var dhxLayout = new dhtmlXLayoutObject(document.body, "3L", "dhx_black");
  • The first argument in dhtmlXLayoutObject() specifies fullscreen initialization.
  • The second argument - 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'.

Here is the recommended code for the fullscreen initialization:

<html>
  <head>
      ...
      <style>
            html, body {
                      width: 100%;
                      height: 100%;
                      margin: 0px;
                      overflow: hidden;
              }
      </style>
      <script>
              var dhxLayout;
              dhtmlxEvent(window,"load",function(){
                  dhxLayout = new dhtmlXLayoutObject(document.body,"...");
              }
       </script>
  </head>
  <body>
      ...
  </body>
</html>

NOTE!
Instead of document.body, you can attach dhtmlxLayout to any HTML container with width:100%.
But beware, just attaching to the body element ensures that the layout will be auto resized to the browser window. Being attached to an HTML container, the layout saves its size.