Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Scott Bailey on Jan 12, 2010 06:57
open dhtmlx forum
Accordion content shrinks in tabbar

Hello,

We have a complex layout. I have a full screen layout. IN one of the layout cells we have an accordion. In one of the accordion cells i have a grid. This all works fine except if I click onto another tab then return to the first the accordion has shrunk by a minute amount, a small space appear beneath it. This happens each time the tab is clicked on so eventually grows.

This is the code for setting up the layout
[code]
dhxLayout = new dhtmlXLayoutObject(document.body, "2E", "dhx_skyblue");
     dhxLayout.cells("a").hideHeader();
     dhxLayout.cells("b").hideHeader();
     dhxLayout.cells("a").setHeight(50);
     dhxTabbar = dhxLayout.cells("b").attachTabbar();
     dhxTabbar.setImagePath("dhtmlxSuite/dhtmlxTabbar/codebase/imgs/");
     dhxTabbar.setStyle("modern");
     dhxTabbar.enableAutoSize(true,true);
     dhxTabbar.enableAutoReSize(true);
     dhxTabbar.setHrefMode("iframes");
     dhxTabbar.addTab("audit","Audit List","100px");
dhxTabbar.addTab("maintenance","Maintenance","100px");
dhxTabbar.addTab("details","Details","100px");
     dhxTabbar.addTab("performance","Performance","100px");
     dhxTabbar.addTab("setup","Setup","100px");
     dhxTabbar.addTab("account","Account","100px");
     dhxTabbar.addTab("info","Information","100px");
    
     dhxTabbar.setContentHTML("details","<div id='detailsObj' style='height: 100%'></div>    ");

     dhxTabbar.setContentHTML("audit","<div id='auditObj' style='height: 100%'></div>    ");
        dhxTabbar.setTabActive("audit");
    
    
    dhxAccordAudit = new dhtmlXAccordion("auditObj", "dhx_skyblue");
    dhxAccordAudit.setIconsPath("../dhtmlxSuite/dhtmlxAccordion/codebase/imgs/dhxaccord_dhx_skyblue/");
    dhxAccordAudit.addItem("mapping", "Mapping");
    dhxAccordAudit.addItem("list", "Details");
    mygrid = dhxAccordAudit.cells("list").attachGrid();
    mygrid.setImagePath("dhtmlxSuite/dhtmlxGrid/codebase/imgs/");
[/code]

I haven't included the code to poulate the grid as its very long but it works.

Any ideas?
Scott Bailey
Answer posted by Alex (support) on Jan 12, 2010 07:48

Hello

>>  dhxAccordAudit = new dhtmlXAccordion("auditObj", "dhx_skyblue");

Try to use attachAccordion method to attach accordion to layout cell: http://www.dhtmlx.com/docs/products/dhtmlxLayout/samples/04_components/06_accordion.html