Skip to main content

Hi,

 

Background: I have a form which contain some views and I am showing this view in a content URL.

 

Is there any way in which I can find out the height of the form dynamically ?

 

My purpose behind this is that if I get the height of the form then I will assign the same height to the content URL so that I won't get the scrall bar.

So I just wanted to get rid of scrall bar.

 

Any suggession is welcome.

 

Thanks,

Rahul

Rahul, 


 


I got curious  about how to get the total height of a form, so I tried it.  Here is what I did. 


In my example I am using K2 designer with Blackpearl 4.6.10


 


I had a project with 2 views already created. 


On one of my views:


I made data labels for each of the views. I called them top and bottom.  I used Data Type # Number.


I created another data label for the total.  Also Data Type # Number


If you have more views, you would need more data labels. 


On the total data label,  I created an expression named total.


I used the +Plus operator then under context controls I drug the top data label to one side and bottom to the other. 


I saved the view and started editing the form. 


 


On the form I edited the When Form initialize rule. I added Transfer Data to the end. 


For the top view I went to 'Top View name' - General - Height  and transferred that to the top data label. 


For the bottom I went to 'Bottom View name' - General  - Height and transferred that to the bottom data label. 


Then I transferred the total data label from context browser total to mapping destination total. 


I went to the runtime form and all my numbers were there. I added a line and refreshed and my numbers grew dynamically. 


 


 


Reply