Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joe on Dec 18, 2009 12:05
open dhtmlx forum
Dhtml Layout

Team,

Ref the question http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=13560

I understand using the below code I can get the layout attached to the tabbar.
tabbar = new dhtmlXTabBar("a_tabbar", "top");
tabbar.setSkin('dhx_skyblue');
tabbar.setImagePath("../../codebase/imgs/");
tabbar.addTab("a1", "Tab 1-1", "100px");
tabbar.addTab("a2", "Tab 1-2", "100px");
tabbar.setTabActive("a1");
tabbar.cells("a1").attachLayout("3L");

But to the about attached lay out I want to add 3 diff div tag using the attachobject, also put custom text on the layout header.

tabbar.cells("a")
.attachLayout("3L").cells("a").attachObject("objId");
abbar.cells("a").attachLayout("3L").cells("b").attachObject("objId");
tabbar.cells("a").attachLayout("3L").cells("c").attachObject("objId");

is the above 3 lines correct. Or what is the method to do the same. When u attach a layout using attachLayout after which How do I access the layoutobject.

Thanks
Joe



Answer posted by Alex (support) on Dec 21, 2009 01:44

Hello,

try to use the following approach to add objects to the layout cells:

 var layout = tabbar.cells("a1").attachLayout("3L");

layout.cells("a").attachObject("objId_1");
layout.cells("b").attachObject("objId_2");
layout.cells("c").attachObject("objId_3");

Here objId_1, objId_2 and objId_3 are ids of 3 diferent containers.