Layout setHeight

Hi to everybody,

I need help about the theme in subject.

I’ m using a 2U layout (main) attached to a tabbar.
Then i attached a “3E” layout (child) to the “B” cell of main.

When i set the width of cell ‘a’ in (main) all runs correctly. the problems are in the child layout where every one of the three cells contain an attached grid. I’m trying to set different heights for the three cells with setHeight, put in code after the init of every grid, but there is no way. In my opinion without setting height, initially the cells should have the same height, but it’s not true:

Cell A seems to be set correctly to 1/3 of main height, cell B is only the minimum and cell C is higher than the other two cells. Why?

If i try to set the height i’m not able to increase cell “A” height and anyway is impossibile reduce the heigh of Cell “C”.

It’ quite strange and i’m not able to understand the logic to follow to set the cells dimensions !

P.S. i’m on 3.6 version.

Thanks for the answer

Hi
First of all try to include dhtmlxlayout_pattern4c.js file in your ilbrary to get opportunity to use 4C pattern. It must to solve the issue. Hope you know how to use patterns (if you need help - we will send you documentation’s backup)
From version 4+ this pattern is included in common dhtmlx.js file by default.

Tanks Darya i’ll try this opportunity but where i can find the
dhtmlxlayout_pattern4c.js file ?

Talking about the new version of the suite i’ll change later when the new version will be more fixed. Ok for new development but upgrade the old applications is quite hard.

Thanks.

Undersatns you :slight_smile:
Here is the path:

3.6\dhtmlxLayout\codebase\patterns\dhtmlxlayout_pattern4c.js

Including it the old way:

[code]

[/code]

is it not enough to include the pattern file after dhtmlx.js without all the others ?

thanks

Dear Darya,

I tried to use the 4c pattern (including only the 4c pattern file after dhtmlx.js). The pattern is showned but i have the same problems in setting height on B,C and D cells. I would like to define:
Cell B: 50% of total height
Cell C : 20%
Cell D: 30%

I tried in every way but nothing.

There must be a way ! Please help-

I see…
You need to count manually depending on the page dimention these procentage values
There is no option to set layout cell’s width/height in %

Dear Darya,

It’s not this the problem. i try to explain better with an example whith the 4c pattern.

The problem is on B,C,D cells.
In the pattern the vertical autosize is set for A and D cells. The problem is that , for istance,
i set the same value for the cells
layout.setHeight(“b”)=200;
layout.setHeight(“c”)=200;
layout.setHeight(“d”)=200;

i expected to view three equal cells or minimum B and C as D has autosize.
Instead, using the function getHeight i get these values:
b=200
c=40
d=122

that are rather strange. Anyway i expected to see the first cell grater than the others but is not so. B and C are shown, probably, with the indicated dimension but D cell (autosize) has a dimension really greater than the sum of the other two cells.
Reducing the dimension of the cells to 100 this is the result:
b=100
c=62
d=100
but what is shown is completely different:
Cell B is probably with the requested height.
Cell C is shown grater then Cell B.
Cell D is again really greater than the sum of the other two cells.

I can’t understand the logic of this issue that makes impossibile to define the dimensions of cells.

Thanks again for your attention.

Bye

Just need to specify:
did you really use this

layout.setHeight("b")=200; layout.setHeight("c")=200; layout.setHeight("d")=200;
or this

layout.cells("b").setHeight(200); layout.cells("c").setHeight(200); layout.cells("d").setHeight(200);
?

Hi Darya,

No don’t worry, in my code the syntax is correct. My willing was to explain the strange issue in theory. Did you understand it ?

Thanks.

Well
We need completed demo to inspect your issue locally
docs.dhtmlx.com/auxiliary_docs__ … pport.html