DHTMLX Docs & Samples Explorer

Constructor of dhtmlxLayout

        var layout = new dhtmlXLayoutObject(parent, view, skin)

where

  • parent - id of HTML element which will be used as parent ( or object itself )
  • view - layout view name (2U, 3L, etc. ), optional
  • skin - skin name, optional
      <div id='my_layout_here' style="width:500px; height:150px;"></div>
      <script>
      //common init code
      var layout = new dhtmlXLayoutObject("my_layout_here");
      </script>

or

      //fullscreen init
      var layout = new dhtmlXLayoutObject(document.body);

Layout, Window, Accordion, Tabbar can create a layout inside their cells by using

      some_component.cells(some_id).attachLayout()

Starting from 2.5 version, layout can be initialized by object notation

      var layout = new dhtmlXLayoutObject({
          some_option1:some_value_1,
          some_option2:some_value_2,
          ...
          some_optionN:some_value_N,
      })

List of supported options

	layout = new dhtmlXLayoutObject({
		parent:document.body,
		skin:"dhx_blue",
		onExpand:function(){
			alert("I'm clicked");	
		}
	});