It's possible to retrieve this information but you have to use the xfa.layout model instead of the xfa.form model in order to do so.
By retrieving the h or maxH property of an object by doing
this.h
this.maxH
means that you're accessing these properties from the xfa.form model which
defines the objects on the form. This model, however, doesn't give you layout information such as the resulting number of pages in a dynamic form once data has been merged into it or, in your case, the actual/current height of a field which expands in height to fit its content.
The layout information must be retrieved from the xfa.layout model using methods that take references to the object whose layout information is sought.
In this case, we want the actual/current height of a field which is height-expandable. We therefore need to use the xfa.layout.h method as follows, in JavaScript:
xfa.layout.h(TextField1, "mm");
The first parameter takes a reference to the field in question and the second takes a string which identifies the unit of measure in which you want the height returned (the default is points (pt)). You can use "cm", "mm", "in", "px", "pt", etc.
Note that you shouldn't use xfa.layout methods unless xfa.layout.ready returns
true or else the information you get may be out-of-sync with how the form actually ends-up being laid-out.
I've attached a sample form which has a multi-lined, height-expandable text field and a button. Clicking the button will produce a message box containing the actual/current height of the text field.
Stefan
Adobe Systems