Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Table inside table must grow together

pmcastro
Level 1
Level 1

Hello

I have a table inside a table. I need that the second table (in Red) expands together with the first cell of the blue table.

pmcastro_2-1590417437591.png

In blue the first table with 2 columns

In red the other table inside cell 2 of the first table

How can I do this?

 

Tkanks for your help.

Regards

1 Accepted Solution
radzmar
Correct answer by
Level 10
Level 10

Hi, 

 

you can use a script to "synchronize" the heights of the inner and outer table. 

Aussumed you have the following hierarchy.

radzmar_0-1590566994757.png

 

Put this script into the layout:ready event of the row "NestedRow" of the nested table.

var cUnit = "mm",
	nRefH = xfa.layout.h(Table.Row, cUnit),
	nThisH = xfa.layout.h(this, cUnit);
	
NestedCell1.minH = nRefH > nThisH === true ? nRefH.toString().concat(cUnit) : "5mm"; // replace 5mm with a minimum height of your choice.
xfa.layout.relayout();

 

The script will compare the height of the row that contains nested table with the row of the nested table itself and will change the minimum height of the first cell of the nested table. All other cells of it will then automatically use the same height.

 

 

View solution in original post

2 Replies
radzmar
Correct answer by
Level 10
Level 10

Hi, 

 

you can use a script to "synchronize" the heights of the inner and outer table. 

Aussumed you have the following hierarchy.

radzmar_0-1590566994757.png

 

Put this script into the layout:ready event of the row "NestedRow" of the nested table.

var cUnit = "mm",
	nRefH = xfa.layout.h(Table.Row, cUnit),
	nThisH = xfa.layout.h(this, cUnit);
	
NestedCell1.minH = nRefH > nThisH === true ? nRefH.toString().concat(cUnit) : "5mm"; // replace 5mm with a minimum height of your choice.
xfa.layout.relayout();

 

The script will compare the height of the row that contains nested table with the row of the nested table itself and will change the minimum height of the first cell of the nested table. All other cells of it will then automatically use the same height.

 

 

View solution in original post