I have a tab bar with a layout nested inside. I’ve turned on every option I can find but the layout doesn’t resize when I resize the browser. I think the outer tab object is resizing but I cant be sure since I have it at 100% height and width.
This is my tab code:
tabbar = new dhtmlXTabBar(“tabbar”);
tabbar.addTab(“find”, “Find”, “100px”);
tabbar.addTab(“label”, “Label”, “100px”);
and this is my layout code:
dhxLayout = new dhtmlXLayoutObject(tabbar.cells("find"), "3l");
I am now using the dhtmlxcontainer.js from a tabbar download of a few days ago.
According to the documentation, layout.setSizes() is for the case of initializing the layout to an object, but I initialized it to a tab bar container. I would have set the style width and height of the layout object before calling layout.setSizes(), but I found nothing but css classes in the dom and no css id. In any case, layout.setSizes() does nothing.
I was able to set the height and width styles for the tab bar since it had a css id and the tab bar did change size. But the layout inside it didn’t. I am surprised the tab bar doesn’t have a setSizes method.
By the way, when I use the code dhxLayout.enableAutoReSize(true), all the initialization code after that does nothing and any further contents defined are blank. There is no jacascript error.
If I can get past this problem I am planning on buying the professional version.
I gave up on nesting a layout inside a tab. I’ve changed my architecture to nest a tab inside a layout instead, with the layout attached to the browser window. Now everything resizes fine, both the layout and the tabs.
I have a new problem. I can’t get scrolling bars to appear inside my tab container for any of the tabs. Things are just hidden off the bottom. tabbar.enableScroll(true) doesn’t seem to do anything.
I tried putting a div with overflow:auto arround my content inside the tab container, but even that didn’t work, which is a real mystery to me. Scrolling in tabs worked fine when it wasn’t nested inside the layout.
I may be doing something stupid but I don’t know what that could be. Nesting components inside each other always seems to have a problem.