Highlighted

Expdant to fit, height value

Avatar

Avatar

_jerome_dinnat_

Avatar

_jerome_dinnat_

_jerome_dinnat_

17-09-2008

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

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

17-09-2008

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
Highlighted

Avatar

Avatar

_jerome_dinnat_

Avatar

_jerome_dinnat_

_jerome_dinnat_

17-09-2008

It works fine, thanks.



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

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

17-09-2008

Yes