cancel
Showing results for 
Search instead for 
Did you mean: 

Size of dynamic object on form

Former Member
0 Kudos

Hi experts,

I'm creating an Adobe Interactive Form and wanted to know how it is possible to access the absolute height, width and the x,y-coordinates of a dynamic object. The dynamic object, lets say a text field, cab expand to fit for height and width and is in a flowed subform (...Subform1.TextField1).

When I try to access the properties w and h as well as (x,y)-coordinates I get a 0 (zero - because it's dynamic). But how can I find out the absolute values of the field on the printed form?

Using Javascript I can get the value for w (similar for h, and (x,y)-coordinates) of a static text field with:

TextField1.getAttribute("w");

I tried that method in every event: init, calculate, validat, preSave, postSave, ready:form, ready:layout... but unfortunately it didn't work for a dynamic text field. I always got always 0 (zero) as value! I think this is because the dimensions of the object are calculated dynamically when the objects are put on the form.

Can anybody provide me where and how to get the dimensions of dynamic objects?

I appreciate any help, hints and good advices which leads to a solution of my problem.

Thanks & regards,

Phil

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Phil,

Please check below thread from Adobe forum:

http://forums.adobe.com/message/3732375

I tried this solution but its not working for me.

Regards,

Vaibhav

Former Member
0 Kudos

Hey Vaibhav!

Thanks a lot for your link to the other thread - there I could find 99% of the solution { xfa.layout.h(Subform,"in",0) } . I just had to find the right event (ready:layout) to get the information.

Now it works.

Cheers Philipp

Answers (4)

Answers (4)

Former Member
0 Kudos

HI Philip,

Can you please help me out on the below mentioned requirement.

Requirement:

Please do the needful on this.

Thanks and regards

Krishna Mohan

Former Member
0 Kudos

Hi,

It's working for me, as long as I use a positioned subform. Take a look at [this form|http://www.2shared.com/document/ZnGkvAoL/Positioning.html].

Best regards, Aldo.

Former Member
0 Kudos

Hi Aldo,

Can you please help me on the below mentioned requirement.

Requirement:

greatly appreciated if you could help us on this.

Thanks and regards

Krishna Mohan

Former Member
0 Kudos

Hi Philip, you should use a positioned subform. In a flowed subform you can't get/set the position of the objects because you don't have control over them.

Best regards, Aldo.

Former Member
0 Kudos

Hey Aldo,

does it make sense to use positioned subforms when having dynamic objects in it? For me it seem like you didn't get the way the layout on the interactive forms works...

Cheers Philipp

Former Member
0 Kudos

Try to get the (x,y) co-ordinates of the subform which contains the dynamic object.

Thanks,

Aravind

Former Member
0 Kudos

Hi Aravind,

thanks for your reply!

I could get the coordinates of the subform. But this does only help, if you are looking for the first dynamic object in the dynamic subform. The objects' coordinates are then relative to the upper right corner - but in a dynamic subform it is always (0,0) - at least at the point in time in my programm.

I guess that before ready:form I will not get any values....

Cheers Philipp