Can a Text Box Grow From the Bottom-Up Instead of Top Down?

D

Don

Is there a easy way to make a text box grow from the bottom up. For
example, if I have a text box which is 3 lines high, if I have field which
only requires one line it would appear in the bottom most line of the text
box; if there were two lines worth of text, it would be displayed in the
bottom 2 lines, etc.

About the only way I have been able to come up with is actually create 3 one
line text boxes and mange them with code on the form or report.

Any thoughts will be greatly appreciated!

Thanks!

Don
 
M

Marshall Barton

Don said:
Is there a easy way to make a text box grow from the bottom up. For
example, if I have a text box which is 3 lines high, if I have field which
only requires one line it would appear in the bottom most line of the text
box; if there were two lines worth of text, it would be displayed in the
bottom 2 lines, etc.

About the only way I have been able to come up with is actually create 3 one
line text boxes and mange them with code on the form or report.

There is no simple way to do this. You can position the
text box further down the section (change its Top property)
by using Stephen Lebans' TextHeightWidth function at
www.lebans.com

The code would be something like this:

DIm lngHgt As Long
lngHgt = fTextHeight(thetextbox)
thetextbox.Height = lngHgt
thetextbox.Top = bottomofthetextbox - lngHgt

It's probably not quite that simple, but I don't know enough
about what else you're doing, especially where
bottomofthetextbox is supposed to be.
 
D

Don

Thanks Marshall!

Don






Marshall Barton said:
There is no simple way to do this. You can position the
text box further down the section (change its Top property)
by using Stephen Lebans' TextHeightWidth function at
www.lebans.com

The code would be something like this:

DIm lngHgt As Long
lngHgt = fTextHeight(thetextbox)
thetextbox.Height = lngHgt
thetextbox.Top = bottomofthetextbox - lngHgt

It's probably not quite that simple, but I don't know enough
about what else you're doing, especially where
bottomofthetextbox is supposed to be.
 

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