Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Max Gano on Jun 13, 2009 12:17
open dhtmlx forum
Hiding layout panels completely

Hi, I am using a 3T layout nested within a 2U cell. I would like to completely hide the bottom two cells of the nested layout at certain times. Is there a way to do this?

Here is the layout I am using:

<div id="parentId" style="position:absolute; width:968px; height:480px;"></div>

<script>
// Main layout of two panels - NavZone (left), WorkZone (right)
    mainLayout = new dhtmlXLayoutObject("parentId", "2U", "dhx_blue");

    mainLayout.cells("a").setWidth(280);
    mainLayout.cells("a").setText("OONdada Navigation");
    mainLayout.cells("b").hideHeader();

    workZoneLayout = new dhtmlXLayoutObject(mainLayout.cells("b"), "3T");
    workZoneLayout.cells("a").setHeight(480);
    workZoneLayout.cells("a").hideHeader();
    workZoneLayout.cells("b").hideHeader();
    workZoneLayout.cells("c").hideHeader();

    workZoneLayout.cells("b").setHeight(1);
    workZoneLayout.cells("c").setHeight(1);
/* ... */
</script>

Answer posted by Alex (support) on Jun 15, 2009 01:32

Hello, 

unfortunately layout doesn't provide the functionality that allows to do that.

But you can try to reload the child layout with 1C view.

...
workZoneLayout = new dhtmlXLayoutObject(mainLayout.cells("b"), "3T");
...
workZoneLayout.clearAll();
workZoneLayout = new dhtmlXLayoutObject(mainLayout.cells("b"), "1C");
...