Can tabs be placed directly in the layout header?


I am using a layout. One of the cells contains a tab bar. The problem is that the layout cell has a header, which I use to collapse/expand the cell, and the tab bar header, which of course is used to change tabs. The two headers take up too much space and look ugly.

Is it possible for me to have one header that contains the tabs and also contains the triangle icon for collapsing/expanding the cell?


Attach a fine approach for you. See the sample in attachment.
sample.rar (139 KB)

Thanks - your approach worked, with a couple of modifications. First, in order to show the proper image (and not the text ‘<’), I had to break out individual icons from your dhxlayout_btns.gif - I don’t think there is a way to work with sprites using .addButton.

Second, I had to attach to the onExpand event of my layout to hide the outer header. I also removed the theme specification from the dhtmlXToolbarObject initializer.

My code is as follows:

var t = document.createElement(“DIV”); = “absolute”; = “24px”; = “6px”; = “4px”; = 1001; = “0px”; = “pointer”;


var tb = new dhtmlXToolbarObject(t);
tb.addButton("open", 0, "", "dhxlayout_dhx_web/dhxlayout_gt.gif", "dhxlayout_dhx_web/dhxlayout_gt.gif");
tb.attachEvent("onClick", function (id) {

dhxLayout.attachEvent("onExpand", function (id) {
    if (id == "b") {

Here is the collapsed view:

And the expanded view:

Thanks again!

I just gave you signal to start, and you already received from it everything you need.
So you are welcome!