dhtmlxWindows - dimensions available to content

I need to create windows of fixed outer dimensions:

  • how do I find out the inner dimensions? (the size available for content)
  • how do I assign a resize handler just for this window? (not for every other dhxwindow)

Depending on what caused the window to open (which menu choice/button clicked) - I will be initializing the window and handling resizing the content within the window with different js objects which will be dynamically loaded in.

[code]var w1 = dhxWindowsObject.createWindow(‘blah1’, 0, 0, 100, 100);
var w2 = dhxWindowsObject.createWindow(‘blah2’, 10, 10, 200, 200);

var myObj1 = new mySpecialObject1(width, height); // how do I get width and height that are available to me?
w1.attachObject(myObj1.container); // myObj1.container is a div with ‘height:100%;width:100%;overflow:hidden’
// I need something like this…
w1.onResizeFinish = myObj1.resize; // resize is a function that will need to take (newHeight, newWidth) as params somehow.

var myObj2 = new aCompletelyDifferentObject(width, height); // again, need to get width and height from somewhere
w2.attachObject(myObj2.container);
w2.onResizeFinish = myObj2.resize; // as above[/code]

I need a general solution for this please, as I do not have the luxury of:

dhxWindowsObject.onResizeFinish = function (window) { // window doesn't have a reference to my javascript object that it contains. // so I dont know what kind of object it is or if it has its own resize handler }

  • how do I find out the inner dimensions? (the size available for content)

If skin is skyblue, the inner width will be equal window width -18 px, height - window height - 42px.

So, w1 inner size is (82px,58px), and (182px,158px) for w2.

how do I assign a resize handler just for this window? (not for every other dhxwindow)

There are two approaches:

  1. w2.attachEvent(“onResizeFinish”,function(w){
    /your code here/
    })
  2. dhxWindowsObject.attachEvent(“onResizeFinish”,function(win){
    if(win==w2){
    /your code here/
    }
    })

Hi ,
I have a problem with dhtmlxwindow onResizeFinish Event ,
when i resize the window first it gives width and height values then second time it gives NaN values
how can i resolve it

dhxWinFormDesigner.attachEvent(‘onResizeFinish’, function(win) {
var dim = win.getDimension();
var pos = win.getPosition();
if (!isNaN(dim[0]) && !isNaN(dim[1]) && !isNaN(pos[0]) && !isNaN(pos[1])){
ads_ajax(“CATAction.ads”, “action=setCatWindowSize&resizeValue=” + pos +","+ dim + “&rs=” + (new Date()).valueOf(), function (loader) {
});
}
});
this is my code and the layout type is 3L

Hello
Locally works fine.
Please provide completed demo on support@dhtmlx.com to reproduce and inspect the issue
Provide there link to this topic and browser version you use