Object Constructor

The process of creating the Windows component implies the creation of two objects:

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

where

  • skin - (string) changes window's skin (setSkin())

  • id - id of a window

  • left - horizontal position of a window
  • top - vertical position of a window
  • width - width of a window
  • height - height of a window

The full list of initialization properties for the createWindow method is given below.

var myWins = new dhtmlXWindows()
myWins.createWindow("about", 20, 30, 300, 200);

Windows can also be initialized by object notation

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

List of initialization properties for createWindow() method

  • move - {boolean} allows a window to be moved (allowMove())
  • park - {boolean} allows a window to be parked (allowPark())
  • resize - {boolean} allows a window to be resized (allowResize())
  • center - {boolean} centers a window in the viewport (center())
  • modal - {boolean} makes a window modal/modeless (setModal())
  • caption - {string} sets window's header text (setText())
  • header - {boolean} shows window's header (showHeader())
Back to top