Cannot disable collapse in dhtmlXLayout

Hello,



I can’t seem to get the setEffect(“collapse”, false); method in dhtmlXLayout to work. There appear to be a couple of problems here:



1. The collapse/expand feature goes “wonky” in my layout (using a 3L layout). The two panels on the right of the layout do not seem to correctly remember their position when expanding/collapsing. I have resizing disabled for one of the right-hand side panels, and after a few expand/collapse clicks we get stuck in a situation where the panels cannot be returned to their original state.



So no big problem, I thought I would just disable the expand/collapse functionality. However the setEffect(“collapse”, false); command seems to have no effect. I am attaching a tree to one of the panels so not sure if that has an impact.



As a last resort I have attached an event which immediately reverses the expand/collapse event. ie:



layout.attachEvent(“onCollapse”, function(itemId){layout.cells(itemId).expand();});



But this is less than desirable as we obviously still see the expand buttons and the tooltip etc.



FYI the relevant code portion is:



                layout = new dhtmlXLayoutObject(“tree”, “3L”, “dhx_blue”);

                tree=layout.cells(“a”).attachTree(0);

                layout.cells(“a”).setText(“Folders”);

                layout.cells(“b”).setText(“Folder Permissions”);

                layout.cells(“c”).setText("");

                layout.cells(“b”).setHeight(150);

                layout.cells(“b”).fixSize(false, true);

                layout.cells(“a”).setWidth(300);

                layout.setEffect(“highlight”, false);

                layout.setEffect(“collapse”, false); // <-- doesn’t seem to work



Any ideas?



Thanks

Hello,

1. The collapse/expand feature works fine, note that neighbour cells’ collapsing/expanding can affect on a result stored value.
2. setEffect method is just for visual effects, not for cancelling events.

Edit the dhtmlxlayout.js:

bar.childNodes[4].onclick = function() {
    // collapse/expand button click
    …
}