Expand my Community achievements bar.

Expdant to fit, height value

Avatar

Former Community Member
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

Avatar

Former Community Member
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

Avatar

Former Community Member
It works fine, thanks.



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