Growing a textbox vertically

C

Chad Knudson

I have a multiline textbox on a form. Normally, users will enter just a
single line's worth of text, so I want to show the textbox as a single line.
If the user puts more lines of text in, I want the textbox to grow
vertically up to 8 lines worth. I have no trouble handling the resizing
issue, and movement of other controls on the form to accomodate for the
growth of this textbox. What happens is that the textbox seems to try to
put the text within the region defined by the original size. When I hit
enter and the textbox height is increased, the textbox changes size but the
two lines of text are rendered in a tiny font so that it can fit within the
original textbox size. All I'm doing is modifying the TextBox.Height
property. Is there something else I need to do to get this textbox to
utilize the entire space?
 
C

Cindy M -WordMVP-

Hi Chad,

Do you have WordWrap turned on?
I have a multiline textbox on a form. Normally, users will enter just a
single line's worth of text, so I want to show the textbox as a single line.
If the user puts more lines of text in, I want the textbox to grow
vertically up to 8 lines worth. I have no trouble handling the resizing
issue, and movement of other controls on the form to accomodate for the
growth of this textbox. What happens is that the textbox seems to try to
put the text within the region defined by the original size. When I hit
enter and the textbox height is increased, the textbox changes size but the
two lines of text are rendered in a tiny font so that it can fit within the
original textbox size. All I'm doing is modifying the TextBox.Height
property. Is there something else I need to do to get this textbox to
utilize the entire space?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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