Expand my Community achievements bar.

printing everything from a text box

Avatar

Former Community Member

I'm new to this, but having a problem printing text from a text box once the text box shows scroll bars.  I'm trying to make a descirption field for a invoice, and was hoping to do the description field to cover small descriptions, but if more than the size of the text box was entered, then the textbox adjusting to that text and all of the text printing.

I hope that I have explained this OK.

K

6 Replies

Avatar

Level 7

Hi Blond1e,

The way to do this is to make the field expandable. You should read up on creating dynamic forms with expandable fields, there are several requirements needed to make an expandable field function correctly. Here's a link to a post with a sample form.

http://forums.adobe.com/message/2182624#2182624

Avatar

Former Community Member

If you have lots of data that is overflowing then having an expandable field is the answer. There is an option to have the font in th efield shrink when the field overflows. If there is only a little bit of overflow then this works well if there is a lot it is not so good because the text can become so small that it cannot be read.

Let me know if you want to use this technique instead.

Paul

Avatar

Former Community Member

thanks I will give this a go, but it does sound what I am after.

K.

Avatar

Former Community Member

I think the expandable text box is the way to go, but would love to know how you do the changing font also.

Thanks

K.

Avatar

Former Community Member

The changing font can be achieved by clicking on the object and then activatinng the font palette. Make sure that you are editing the value only ...not caption and value. Then set the font to 0 and make sure that the multiline checkbox is on.

Paul

Avatar

Level 10

Hi Paul,

That is a great tip, I can throw away some rather dodgy code that tried to do just that.  I hope it gets marked as correct so more people might read it.

Hi K,

For some text fields I would go with reducing the font but for some (with a lot of text) I would have a scrolling textbox on the screen (so it doesn't muck up my layout) and an expanding textbox for when printing.  So in the prePrint event have;

        

this.minH

= this.h;

this.h

= 0;

and in the postPrint event have;

this.h

= this.minH;

this.minH

= 0;

Thanks again Paul,

Bruce