DHTMLX Docs & Samples Explorer

Constructor of dhtmlxWindows

Creating windows requires to create two objects

  • viewport, which will define zone of window's activity ( needs to be created only once )
  • window object itself
    var wins = new dhtmlXWindows()
    wins.createWindow(id, x, y, width, height);

where

  • id - id of window
  • x - x position of window
  • y - y position of window
  • width - width of window
  • height - height of window
    var wins = new dhtmlXWindows()
    wins.createWindow("about", 50, 50, 300, 200);

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

    var wins = new dhtmlXWindows();
    win.createWindow({
        some_option1:some_value_1,
        some_option2:some_value_2,
        ...
        some_optionN:some_value_N,
    });

List of supported options

    var wins = new dhtmlXWindows({
        image_path:"codebase/imgs/",
        skin:"dhx_blue"
    });
    wins.createWindow({
        id:"about",
        width:300,
        height:200,
        center:true,
        onClose:function(){
            alert("I'm closed");
        }
    });