How do I synchronize heights of text boxes in a report detail sect

G

Guest

I have a rox of textboxes in the detail section of a report, all with the
'Can Grow' property set to Yes as well as the 'Can Grow' property of the
deatil section. I want to make all boxes become the same height if any of
them grows to accommodate longer values. Thank you in advance for any
assistance you can provide.
 
R

Rick Brandt

Valerie said:
I have a rox of textboxes in the detail section of a report, all with
the 'Can Grow' property set to Yes as well as the 'Can Grow' property
of the deatil section. I want to make all boxes become the same
height if any of them grows to accommodate longer values. Thank you
in advance for any assistance you can provide.

Can't really be done. You can use transparent borders and code behind the
form to draw the boxes instead and have that code draw all boxes the same
height, but it is a rather involved process. I think you have to use the
print event because that is after the final height of the detail section has
been determined. Then use that height to determine where to draw the lines.

A somewhat simpler method that can work in some situations is to use the
standard line tool to draw a line across the top of all TextBoxes and also
across the bottom of them. You also need to make the detail section so it
is pushed up right underneath that bottom horizontal line. Whichever
TextBox grows the most will automatically "push" the lower line down the
page and of course the upper line doesn't need to move so all that is left
is the vertical lines.

For that you can use the format event of the section to draw lines that have
a lower coordinate that is lower than will possibly ever be needed. One
feature of the line event is that it cannot draw a line that extends outside
the section where the code is run. So when providing a very large lower
coordinate value you end up with a line that always extends to the bottom of
the section and then stops.
 
G

Guest

Could you replace the row of textboxes with a single, calculated textbox that
concatenates the information from the fields you need?
 
M

MA

Valerie said:
I have a rox of textboxes in the detail section of a report, all with
the 'Can Grow' property set to Yes as well as the 'Can Grow' property
of the deatil section. I want to make all boxes become the same
height if any of them grows to accommodate longer values. Thank you
in advance for any assistance you can provide.

work with space
Usa a font like courier new that work with same space for each letter.
If in your control of qty (for example) the line accept 5 characters e
description that can grow accept 20 character
calculate the space you need and add to qty control.

Example

This is the description than you can put in a control
this string is len 54 character in a control of 20 char.

the control qty has a source =
space(int(len(FieldDescription)/20)-Len(qty)+1 & qty
This istruction written quickly (so verify it) pull you qty at the end of
the control

N.B: It's important the font
--
_ _
Ciao
MAssimiliano Amendola www.accessgroup.it
Cisa - Conferenza Italiana per Sviluppatori Access
Info: www.donkarl.com/it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top