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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Expdant to fit, height value

_jerome_dinnat_
Level 5
Level 5
Hi,



I have a textfield "t1" set to expand to fit for the heigth value.



I want some other textfields have the same heigth that t1 when it is growing up.



In the script event ,t1.h has 0in as value when it is expand to fit. How can I take the h value of my textfield ?



Thanks
3 Replies
pguerett
Level 10
Level 10
When you ask for the h value in that way you are asking the template dom. The value reported will be for when it was loaded. You need to ask the Layout Dom for the same value. It will have the updated information. You can use code like this:



var oH = xfa.layout.h(txtDescription, "in");

this.h = oH + "in";



where txtDescription is the name of the field. You can put this code on the Layout Ready event of the field that needs to adjust size.



Make sense?

Paul
_jerome_dinnat_
Level 5
Level 5
It works fine, thanks.



The Layout Ready Event happends the first time the pdf is print and every time the layout is modify ?