Can not set cell height in Layout placed inside of Tabbar

Hello,

I’m having a difficulty setting height of layout cells. The layout is placed inside of a tabbar. This is after migrating to DHTMLX 4.5 PRO

[code]

html, body { width: 100%; height: 100%; margin: 0px; padding: 0px;} [/code]

console.log output:
HEIGHT: 55-0-55

With older DHTMLX version same code is working properly and this is the console.log output:
HEIGHT: 100-323-200

Hello
Try to set selected the first tab to attach layout there:

{ id:"tab_1", text: "aaa",width:70, active: true},

Indeed “active: true” fixes the issue.

But there is a similar layout attached to each one of the tabs (tab_2, tab_3). What should I do? Attach events or run a JS function for each tab? Is there a better way?

Actually setting just one tab to “active” seems to fix the issue for all tabs. thanks.

You are welcome!

Hi

that’s correct, in case of tabbar if cell wasn’t active before it ‘uninitialized’ and its dimension is about 0x0, so when you initing layout inside it can’t proberly determine parent size.

Help Help,

I’ve the same problem in Suite 5.2.

this is my code:
magTabbar.tabs(“carico”).setActive();
layout5 = magTabbar.tabs(“carico”).attachLayout(“2E”);
layout5.setOffsets({
top: 0,
right: 0,
bottom: 0,
left: 0
});
layout5.setSeparatorSize(0, 0);
layout5.cells(“a”).hideHeader();
layout5.cells(“b”).hideHeader();

layout5.cells(“a”).setHeight(400);
layout5.cells(“a”).setMinHeight(400);
layout5.cells(“a”).fixSize(true, true);

As you can see the layout.cells(“a”) is very small while it should be 400 px height.

I tried everything (setSizes) included the activation of tab before attaching the layout.

I precise that the same code works corretly if i include the layout in an Accordion instead a Tabbar!!

What can i do ?

Unfortunately I was not able to reproduce your issue locally.
The following snippet based on your provided code works well for me:
http://snippet.dhtmlx.com/5/2f503dab8
If the problem still occurs for you please, provide a complete demo or a demo link, where the problem can be reconstructed locally.