hi,
I have a subform that has a list of table rows inside this subform. These table rows have the "hidden" presence and the presence changes to "visible" based on a radio box selection. Intially, when the form is loaded, these table rows are all hidden by default until users adds to it by changing the settings of the radio box. The subform that holds these table rows has a border and the content is "Flowed". When the content is flowed and when all the table rows are hidden, the subform height is too small and the box outline does not look nice. is there a way for me to add a minimum height for this flowed subform? Is this possible?
I tried adding the following javascript to the layout:ready event of the subform but it doesnt work:
this.minH = "1.8in";
I understand that min-height can be added to the textfields, but I dont understand why I cant add a minimum height to a flowed subform. Is there another way to do this? Do I need to put the above javascript for some other event in order for it to work? plz help..
Solved! Go to Solution.
Views
Replies
Total Likes
I believe minH and minW are inherited attributes and are available to all containers even though they are not all implemented. A flowed subform only reserves enough space for visible content, so if there is no content to draw, there is no space available. The only space reserved outside the available content is for the frame (i.e. borders/margins/etc.) so what you can do when you hide the rows is to check if the subform has anything left in it. If not then increase the top or bottom margins to increase the visible frame.
Subform1.margin.bottomInset = "1.8in";
You can set it back when you show something. Otherwise, you can place a spacer subform (positioned) inside the flowed subform to reserve space and show/hide that when applicable.
Views
Replies
Total Likes
I believe minH and minW are inherited attributes and are available to all containers even though they are not all implemented. A flowed subform only reserves enough space for visible content, so if there is no content to draw, there is no space available. The only space reserved outside the available content is for the frame (i.e. borders/margins/etc.) so what you can do when you hide the rows is to check if the subform has anything left in it. If not then increase the top or bottom margins to increase the visible frame.
Subform1.margin.bottomInset = "1.8in";
You can set it back when you show something. Otherwise, you can place a spacer subform (positioned) inside the flowed subform to reserve space and show/hide that when applicable.
Views
Replies
Total Likes
Thank you dohanlon....now it makes sense on why the flowed subfrom has zero height when its contents are hidden. I tried your method of adding a positioned subform at first and the hide this subfrom when the table rows are visible, but i scratched that idea since the height still changes when this positioned subform is hidden when other fields are selected. Also I understand now that the other method would be to control the margin and change it based on the number of fields visible in it. But in the end, I figured out a another method that works out better for my case. What I did was, I placed a table with 1 row 2 columns and I placed this flowed subform in column 1. In column 2, I placed a positioned subform with height set to 1.8in. I then changed the column 2 presence to invisible. So, now since the column 2 has this minimum height, the overall table row that holds this flowed subform also inherits this minimum height and hence it is giving the appearance that I wanted....I am glad this works..
Thanks for explaining and showing me the way...
Views
Likes
Replies