cancel
Showing results for 
Search instead for 
Did you mean: 

Height of colomns

AntonPierhagen
Active Participant
0 Kudos

hi all

I have made a subform which is flowed and which read the content of an internal table. When i read out the fields of this internal table into the fields of the subforms everything is ok.

But all the colomns are pu to gether in one row. When one of the fields has much data, the height of this colomn will expand.

Herefore i set the height of this colomn fit to page. When this is the case, the content of a field is larger then the original parameters the other fields in the row shoudl also get the same height. But how do you do that?

When the height of the field is 'fit to page' i cannot retrieve the height via javascript. the variable 'h' .

and set the height of the other fields equal to that one. And when i set the height on a value, it won't expand

so how do you this ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anton,

Good to see a post on this which i faced just in this week.

Let me put up what i understood here.

You have a subform say A which is flowed in western text and have 3 fields say x, y, z intially say all the fields are of 1 in size and they are autofit in height.

when all the fileds have solid border and if field z has data which pushes it from 1 inch to 3 inch leaving other 2 on 1in

so you need all the column borders are to be set to same is it so?

when i had this problem i did some java scripting like this.

1) In Subform's A layout ready even

2) I get heights of the 3 variabls

3) find max of of the three

4) assign the heights to all the 3 fields like a.h = maxValue+"in";

Hope this helps, else let me know if i misunderstood your requirement.

Cheers,

Sai

AntonPierhagen
Active Participant
0 Kudos

Hi

Thanks! Thats indeed what i meant. But when i try to get the MAXVALUE of a field it is always zero. So how did you do that?

OttoGold
Active Contributor
0 Kudos

as you can see I don´t do it this way. I test if the source of the height has height different from the default one and if so I set the same height for all the objects/ fields.

Otto

AntonPierhagen
Active Participant
0 Kudos

Hi Otto!

I am sorry you put your reply exatly when i posted my reply. so my answer looks a little bit silly.

I had looked at your code. You put the javascript code in the subform it self and at that level you make sure all height for all the fields in that subform are equal to the correct height?

thanks for your replies!

OttoGold
Active Contributor
0 Kudos

at that level you make sure all height for all the fields in that subform are equal to the correct height?

exactly. I copy the height of one field to the others. I believe it is initialize event...? or maybe layout:ready. One of these two. Try and tell us. Cheers Otto

AntonPierhagen
Active Participant
0 Kudos

Thanks!

It works!!

Kind regards

Anton Pierhagen

AntonPierhagen
Active Participant
0 Kudos

it was layout ready

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Example follows (please ignore the names of the fields, they are in my native language):

 
var aheight = xfa.layout.h(this.nazev, "in");
var standard = '0.2';
if (aheight != standard)
  schvaleny.h  = aheight + "in";

Cheers Otto

p.s.: this means row subform and all the fields in the script are of this one row as you want