Layout header show/hide

I am trying to make a full page example based on the sample 02_conf/15_header_footer.html.

With the following code snippet, I’m trying to show or hide the header that is attached to the Layout Object. My issue is that once the attached header is hidden, the Layout does not resize to fill the screen.

I was unable to find a “detachHeader”, “showHeader” or “hideHeader” methods for the Layout Object? Does anyone have a suggestions?

Thanks,
Matthew.

dhxLayout = new dhtmlXLayoutObject(document.body, “1C”);
dhxLayout.attachHeader(“myHeader”);

function screenMode( myMode ) {
var myNorm1 = document.getElementById(‘myNormalButton’);
var myFull1 = document.getElementById(‘myFullButton’);
var myHeader = document.getElementById(‘myHeader’);
if ( myMode == ‘Full’ ) {
myNorm1.style.display=“block”
myFull1.style.display=“none”
myHeader.style.display=“none”
} else {
myNorm1.style.display=“none”
myFull1.style.display=“block”
myHeader.style.display=“block”
};
return true;
};

I was unable to find a “detachHeader”, “showHeader” or “hideHeader” methods for the Layout Object?

There are not such methods.

You may try to use views: dhtmlxLayout/samples/01_init/09_views.html

In 1C layout you may change views with 1C and 2E layouts:

dhxLayout = new dhtmlXLayoutObject(document.body, “1C”);
dhxLayout.cells(“a”).hideHeader();

layout1 = dhxLayout.cells(“a”).attachLayout(“1C”);

layout2 = dhxLayout.cells(“a”).view(“header”).attachLayout(“2E”);
layout2.cells(“a”).hideHeader();
layout2.cells(“a”).setHeight(100);
layout2.cells(“a”).fixSize(0,1)

function showHeader(){
dhxLayout.cells(“a”).view(“header”).setActive();
}
function hideHeader(){
dhxLayout.cells(“a”).view(“def”).setActive();
}

Thank you for your quick response.