Expand my Community achievements bar.

Help: Resizing a sub-form

Avatar

Former Community Member
Hi



Hope someone can point me in the right direction with this problem. I have a positioned subform that contains a flowed subform (flow direction top to bottom) which has a border. This in turn contains 3 flowed subforms (flow direction Western text) each containing two text fields. The result looks like this...



/------------------------------------------\

| Doc Number |

|------------------------------------------|

| Static Text |

|------------------------------------------|

| Field A | Field B |

|------------------------------------------|

| Field C | Field D |

|------------------|-----------------------|

| Field E | Field F |

\------------------------------------------/



The data in the last of these 3 subforms (Fields E and F) may not exist - if they don't then I hide the last sub-form with the FormCalc script in the ready:layout event of the field (run at server);

if (HasValue($) == 0)

then .parent.presence = "hidden"

endif



This succeeds in hiding the last subform but the 'real estate' that it would normally occupy is still there i.e. the sub-form looks like this;

/------------------------------------------\

| Doc Number |

|------------------------------------------|

| Static Text |

|------------------------------------------|

| Field A | Field B |

|------------------------------------------|

| Field C | Field D |

| |

| |

\------------------------------------------/



But I want it to look like this;

/------------------------------------------\

| Doc Number |

|------------------------------------------|

| Static Text |

|------------------------------------------|

| Field A | Field B |

|------------------------------------------|

| Field C | Field D |

\------------------------------------------/



Is this possible and if so how do I achieve it? I have tried changing the height property of the parent sub-form (the one with the border) but this doesn't seem to have any effect (maybe I'm using the wrong event?).



NB - I am using Adobe LiveCycle Designer 7.1 that comes with SAP Netweaver.



TIA

Gareth
4 Replies

Avatar

Level 5
Check the 'Layout' tab and look for Height property for all the subforms in the tree. Having 'Expand to fit' and 'Auto-fit' checked under Height property will make the things better for you.

Avatar

Former Community Member
Sorry SekharN those settings were already made which is why I thought that I would have to adjust the height via a script.

Avatar

Former Community Member
Update: If anyone has the same issue, I have found that the script was in the wrong event. I moved the script to the Initialise event and it works properly i.e. the parent subform is re-sized.



Regards

Gareth

Avatar

Former Community Member
Hi Gareth,

I am new to adobe forms i 've a small issue with subform content propertie (positioned/ flowed), whats the diff of these. I ve used flowed option to display the tables but in the standard progs they 've used flowed option for all the subforms(even to display single text field). If u solve this issue really it 'l be helpful to me.



Thanks in advance.



Regards

Phalani