Formatting Box to expand

  • Thread starter Thread starter Tracy
  • Start date Start date
T

Tracy

I am creating an invoice. Each line item on the invoice
has a field for additional description in it which may or
may not contain data. I have set that particular field to
grow.

I have enclosed all of the items that make up a line item
with a box, so that when printed it has a form type look.
The box I have around the line item does not expand if my
field for additional description needs to expand.

Can I do this or is there a better way to achieve these
results?

Thank you,
Tracy
 
"Box"? The only thing I know that expands/shrinks with text is the Border of
individual Controls using CanGrow/CanShrink property. Those are, as I said,
the Border of individual Controls -- one doesn't grow another. You can, at
runtime, read the height of the shrunken/expanded control but the height of
all Controls are read-only at that time, so you can't use it to set the
height of other Controls.

I'd suggest you follow your Controls with a Line Control so that it will be
"pushed down" by the expanded Control. That will not be a "box", and it
won't separate columns, but it will give the user a "visual clue".

If there's code to do what something near you want, it'll likely be at MVP
Stephen Lebans' site, http://www.lebans.com.

Larry Linson
Microsoft Access MVP
 
Tracy said:
I am creating an invoice. Each line item on the invoice
has a field for additional description in it which may or
may not contain data. I have set that particular field to
grow.

I have enclosed all of the items that make up a line item
with a box, so that when printed it has a form type look.
The box I have around the line item does not expand if my
field for additional description needs to expand.


Boxes and vertical lines do not grow along with some control
in the section. I think the easiest way to do this is to
replace the box with horizontal lines at the top and bottom
of the detail section. Then use the detail section's Print
event to draw the vertical lines:

Me.Line (0, 0) - (0, 20000)
Me.Line (Me.Width, 0) - (Me.Width, 20000)

You do not need to know how tall the section has grown since
the line will be cropped to the section boundary.
 
Back
Top