Window

Window is a component that presents a standard on-screen window. Ui-related window inherits from view.


Full code of the window in the picture

Initialization

To init the component you need to perform a simple procedure - call initialization code.

Initialization code or an object constructor, lets you create an object by using common declaration.

dhx.ui ({view:"window", 
...})

Parameters

  • head - specifies content of the window's header.
    Here you can place all you want: nest another element, specify an HTML template, string and etc.
  • body - specifies content of the window.
    Here you can place all you want as well
  • top - (integer) sets the top offset.
  • left - (integer) sets the left offset.
  • move - (boolean) specifies whether a window can be moved (to move - click on the window's header). The default value is false.

Please note, Window is a derived class, i.e. it inherits all the features of the base class (window → view).

dhx.ui({
	   view:"window",
	   head:{
			view:"toolbar", type:"MainBar",
			data:[{type:"label", label:"Window"}]
		},
           body:{
			type:"clean", rows:[
			                     {template:"do something"},
				             {view:"toolbar", type:"BigBarV", height:110, 
				                  data:[{type:"button", label:"Ok"},
			                                {type:"defaultbutton", label:"Cancel"}]
				           }]
		 },
	   top:20,
           left:20,
           move:true
})

Related how-tos