Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Biju on Jan 21, 2009 03:18
open dhtmlx forum
Multi line Tabs

Hi,

Is it possible to create multi line tabs dynamically? I know that it is possible by loading from XML file.
I am writing code like this..

//document.getElementById("edPV").value = parent.myText;
    tabbar=new dhtmlXTabBar("a_tabbar","top");
    tabbar.setImagePath("dhtmlxTabbar_v20_pro_81009-EVAL/dhtmlxTabbar/codebase/imgs/");
    tabbar.setSkinColors("#FCFBFC","#F4F3EE");
    tabbar.addTab("a1","Principal First","100px");
    tabbar.addTab("a2","Amount Step","100px");   
    tabbar.addTab("a3","Percent Step","100px");   
    tabbar.addTab("a4","Skip Series","100px");   
    tabbar.addTab("a5","Monthly Skip","100px");   
    tabbar.addTab("b1","Normal","100px");   
    tabbar.addTab("b2","Interest Only","100px");   
    tabbar.addTab("b3","Principal + Interest","100px");
    tabbar.addTab("b4","Existing Fixed","100px"); 
    //tabbar.loadXML("tabs3.xml");     
    tabbar.setContent("a1","gridbox");               
    tabbar.setContent("a2","gridbox2");    
    tabbar.setContent("a3","Div1");               
    tabbar.setContent("a4","Div2");
    tabbar.setContent("a5","Div3");          
    tabbar.setContent("b1","Div4");               
    tabbar.setContent("b2","Div5");               
    tabbar.setContent("b3","Div6");               
    tabbar.setContent("b4","Div7");               
    tabbar.setTabActive("a1");

They all appear in a single line with a scroll bar.
Any solution?

Thanks,
Biju
Answer posted on Jan 21, 2009 04:16
You can provide row index as parameter of addTab command

  tabbar.addTab("b1","Normal","100px",0,1);
  tabbar.addTab("b2","Interest Only","100px",0,1);
  tabbar.addTab("b3","Principal + Interest","100px",0,1);
  tabbar.addTab("b4","Existing Fixed","100px",0,1);

Answer posted by Biju on Jan 21, 2009 05:04
Thanks a lot, it works fine.