Fitting Information

  • Thread starter Thread starter TH
  • Start date Start date
T

TH

On a report, is there a way to wrap text within a text box? Also, is there
a way to shrink the text to fit a certain size text box? I am creating a
recipe card and I want the size to be fixed. However, some recipes can be
large and won't fit on the card. Even if I could make the data go into
multiple colums it would be great. I know you can use CanGrow and CanShrink
but that won't accomplish what I want. Any suggestions would be
appreciated. Thanks.

Tonye
 
TH said:
On a report, is there a way to wrap text within a text box? Also, is there
a way to shrink the text to fit a certain size text box? I am creating a
recipe card and I want the size to be fixed. However, some recipes can be
large and won't fit on the card. Even if I could make the data go into
multiple colums it would be great. I know you can use CanGrow and CanShrink
but that won't accomplish what I want.

Text in a text box will wrap automatically and with CanGrow
you can see it regardless of how long it is.

As far as making the text font smaller to fit into a
presized text box, you can use Stephen Lebans' TextHeight
function at www.lebans.com to find a font size such that the
text fits:

Dim intSize As Integer
For intSize = 12 To 4 Step -1
thetextbox.FontSize = intSize
If fTextHeight(thetextbox) <= thetextbox.Height _
Then Exit For
Next intSize
 
Thank you!

Tonye

Marshall Barton said:
Text in a text box will wrap automatically and with CanGrow
you can see it regardless of how long it is.

As far as making the text font smaller to fit into a
presized text box, you can use Stephen Lebans' TextHeight
function at www.lebans.com to find a font size such that the
text fits:

Dim intSize As Integer
For intSize = 12 To 4 Step -1
thetextbox.FontSize = intSize
If fTextHeight(thetextbox) <= thetextbox.Height _
Then Exit For
Next intSize
 
Back
Top