Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TextBox with Fixed Width and Autosized Height

12 views
Skip to first unread message

hr38581

unread,
Aug 5, 2008, 3:24:01 PM8/5/08
to
I am attempting to create a form using ActiveX controls (MS Word 2000). I
would like a TextBox that has a fixed width but auto-sizes the height to the
user’s text entry. The user will be entering multiple lines with hard line
breaks (with possibly some formatting such as bulleted lists) into the text
field.
I have set the following properties: AutoSize=True, EnterKeyBehavior=True,
IntegralHeight=True, MaxLength=0, MultiLine=True, WordWrap=True, Height=
49.95, and Width=436.75. The TextBox starts out fine when I save my form, but
when a user begins to enter text, the TextBox re-sizes to about one character
width (losing my desired fixed width of 436.7) and then increases the height
of the TextBox to accommodate the remaining text entry.
The Help on the AutoSize property states “For a multiline text box that
contains no text, setting AutoSize to True automatically displays the text as
a column. The width of the text column is set to accommodate the widest
letter of that font size. The height of the text column is set to display
the entire text of the TextBox. For a multiline text box that contains text,
setting AutoSize to True automatically enlarges the TextBox vertically to
display the entire text. The width of the TextBox does not change.”
I have tried with default text that equals my desired TextBox width, and if
the user only adds to the default text, then the width is maintained, but if
the user deletes or overwrites the default text, the width of the TextBox is
reduced, despite what the Help states.
How can I create the TextBox with a fixed width but auto-sized height?
Thank you in advance.

carley...@gmail.com

unread,
Apr 13, 2017, 12:35:55 PM4/13/17
to
0 new messages