Hi,
I was checking this question: dhtmlx.com/docs/products/kb/inde … adjustSize
I have the same problem but there is a little difference. My tabbar is inside another tabbar.
The width of main tab is fixed but the height must change dynamically with the height of the subtab content.
So, I need to set the main and subtab height to subtab content height.
How could I do that?
Thanks a lot.
You can use same code as in above sample, attached to both tabbar, with small addition to logic of inner tabbar
child_tabbar.setOnSelectHandler(function(id){
var box=this._content[id];
if (!box) return;
box.style.height=“1px”;
var y=box.scrollHeight+10;
box.style.height=“100%”;
this.setSize(this._conZone.offsetWidth,y,true);
parent_tabbar._onsel(); //trigger the same logic of parent tabbar
return true;
});
in such case, after child tabbar updates its sizes, it will force update of parent tabbar