Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dan on Mar 08, 2009 01:52
open dhtmlx forum
dthmlxtabber inside dhtmlxlayout

How do I set the mode such that the tabber is displaying on the left so that it doesn't cover the layout's text. My code is:

<body style="width: 100%; height: 100%; margin: 0px; overflow: hidden;">

<script>
// initialization of the layout
var dhxLayout = new dhtmlXLayoutObject(document.body, "2E");
dhxLayout.cells("a").setText("x");
dhxLayout.cells("b").setText("y");
dhxLayout.cells("b").setHeight(200);

// attaching a tabbar
var tabbar = dhxLayout.cells("a").attachTabbar();
tabbar.setImagePath("dhtmlxTabbar/codebase/imgs/");
tabbar.setStyle("winDflt");
tabbar.addTab("a1","Exports","100");
tabbar.addTab("a2","Transcodes","100");
tabbar.addTab("a3","Delivery","100");
tabbar.setContentHTML("a1","test1");
tabbar.setContentHref("a2","http://www.yahoo.com");
tabbar.setContentHTML("a3","test3");
tabbar.setTabActive("a1");
// tabbar.enableAutoSize(true,true);
</script>

</body>
</html>
Answer posted by Alex (support) on Mar 09, 2009 06:58

Layout doesn't provide another way of automatic tabbar implementation. 

You can try to use the following approach.


<body style="width: 100%; height: 100%; margin: 0px; overflow: hidden;">

<div id="tid" style="width: 100%; height: 100%"></div> 

<script>

...

dhxLayout.cells("a").attachObject("tid");

var tabbar = new dhtmlXTabBar("tid");
tabbar.enableAutoReSize(true,true);

...

</script>

</body> 
</html>


Answer posted by Francisco on Jan 12, 2010 11:15

Will there be a fix for this coming?

var tabbar = dhxLayout.cells("a").attachTabbar();

To me the above code makes sense...you attach the tabbar to the layout cell and whenever the layout cell is resized the tabbar automatically resizes.  Works great.

The only problem is that the tabbar covers the layout header area and thus covers the layout cell quick collapse button. 

If you can't prevent that tabbar from covering the layout cell header is there a way to add the layout header quick collapse button to the tabbar tabs area?

 

 

Answer posted by Alex (support) on Jan 13, 2010 00:11

attachTabbar method hides a header of a cell. To show it. You can use the following:

var tabbar = dhxLayout.cells("a").attachTabbar();

dhxLayout.cells("a").showHeader()