Expand my Community achievements bar.

Setting a minimum height for a dyanmic subform

Avatar

Level 3

I am creating a form that is reading in a set of instructions from XML. I would like to limit the instructions to 2 per page. Is there a way I can set a minimum height for the subform, so it will at least be 1/2 the page?

3 Replies

Avatar

Level 10

Hi,

Sounds like you want to set the maximum height of the field.

Have a look at .maxH property in the help file. It would look something like this in the docReady event of each field:

this.maxH = "5.125in";

Good luck,

N.     

Avatar

Level 3

Setting a maximum doesn't sound right. Maybe I should restate what I want because now I can see how it was confusing.  I want there to be a maximum of 2 instructions per page. The page could have only 1 instruction if it goes beyond half the page. (In fact, an instruction can take up to as many pages it needs.) But let's say for instance I have 3 really short instructions. All of them are short enough to fit on one page, but I want to restrict instructions to half page so only 2 will show up. Does that make more sense?

Avatar

Level 10

Hi,

If that's the case, then you could size each field in the Design view so that each field takes up have a page. Then in the Layout tab select "expand to fit height" (should also have allowed multiple lines in the Object / Field tab).

Then when you import the XML, short instructions will appear two per page, while longer ones will flow onto following pages. If the fields are set to half a page then you should not get more than 2 on a page.

Hope that is of help,

Niall