Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by josh on Nov 17, 2008 20:26
open dhtmlx forum
layout panels resizing bugging

heelo,

why does the layout panels gets bugged when i try to resize any of them? (it wont leave resize mode)

here's the code:

function testui(){

    var dhxLayout = new dhtmlXLayoutObject(document.body, "3L");
    var mainStatusBar = dhxLayout.attachStatusBar();
    var dhxAccord = dhxLayout.cells("a").attachAccordion();
    var contentStatusBar = dhxLayout.cells("b").attachStatusBar();
    var menuBar = dhxLayout.attachToolbar();
    var dhxTabbar = dhxLayout.cells("c").attachTabbar();

    var that = this;

this.get = function(){
return dhxLayout;
}
    /**
     *
     */
    this.getMainStatusBar = function(){
        return mainStatusBar;
    }
    /**
     *
     */
    this.getContentStatusBar = function(){
        return contentStatusBar;
    }
    /**
     *
     */
    this.getNavigationBox = function(){
        return dhxLayout.cells("a");
    }
    /**
     *
     */
    this.getContentBox = function(){
        return dhxLayout.cells("b");
    }
    /**
     *
     */
    this.getBottomBox = function(){
        return dhxLayout.cells("c");
    }
    /**
     *
     */
    this.getNavigationAccordion = function(){
        return dhxAccord;
    }
    /**
     *
     */
    this.getMenuBar = function(){
        return menuBar;
    }
    /**
     *
     */
    this.getBottomBar = function(){
        return dhxTabbar;
    }
}

var ui = new testui();
var newLayout = new dhtmlXLayoutObject(ui.getBottomBox(),"2L");


--------------------

what am i doing wrong here?

this is the error if it helps:
-----
this.entBox.parentNode is null
adjustSize()()dhtmlx.js (line 2948)
setText()()dhtmlx.js (line 2129)
setText()()dhtmlx.js (line 2129)
setText()()dhtmlx.js (line 2129)
setText()()dhtmlx.js (line 2129)
[Break on this error] {this._conZone.style.width=parseInt(thi...ay=="none")this.setSize(w,h+4,true);else
------------


thanks,
Answer posted by Support on Nov 18, 2008 06:10
Resize is ok, but first you attach tabbar to cell "c" and then you attaching another layout into it,
but parent layout still think that tabbar is attached.
Answer posted by josh on Nov 18, 2008 21:52
thanks that fixed it, my bad for the rotten code :)

i have another question coming out of this:

is there a way to test/check whether another object has already been attached to it? notably im guessing only grid,tree,tabbar,editor,window,...
i guess SB,WTB,WMB won't cause this problem or will they?



thanks again,
Answer posted by Support on Nov 21, 2008 04:33
Here is a list:

attached component - link:

dhtmlxTree - dhxLayout.cells("a").window.tree
dhtmlxGrid/dhtmlxTreeGrid -
dhxLayout.cells("a").window.grid
dhtmlxTabbar -
dhxLayout.cells("a").window.tabbar
dhtmlxAccordion -
dhxLayout.cells("a").window.accordion
dhtmlxEditor -
dhxLayout.cells("a").window.editor
dhtmlxFolders -
dhxLayout.cells("a").window.folders
dhtmlxMenu -
dhxLayout.cells("a").window.menu
dhtmlxToolbar- dhxLayout.cells("a").window.toolbar
StatusBar -
dhxLayout.cells("a").window.sb

Now you can use this links in code like this:
if (!
dhxLayout.cells("a").window.tree) {
    // dhtmlxTree is not attached into cell "a"
} else {
    // dhtmlxTree is attached into cell "a"
}