BUG: Textbox Can Be Sized To Less Than Minimum Height (201509)



The information in this article applies to:

  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0

This article was previously published under Q201509

SYMPTOMS

If you resize a TextBox control with the mouse at design time, you can make the height so small that some of the text is cut off.

RESOLUTION

To work around this problem, try to set the Height property of the TextBox control to a tiny value (for example, one Twip) in the Properties window. This assigns the TextBox control to its correct minimum height value, which allows one line of text to be visible.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The minimum height of the TextBox control should always allow at least one line of text to be visible. At design time, a TextBox control can be resized such that the height of one line of text within the control is not completely visible.

Steps to Reproduce Behavior

  1. Create a new Standard EXE project in Visual Basic. Form1 is created by default.
  2. In the Toolbox, double-click TextBox to add a TextBox control to Form1.
  3. With the mouse, select one of the sizing handles along the bottom of the TextBox control, and resize the control to its minimum height.
  4. With the mouse, select one of the sizing handles along the bottom of the TextBox control. Notice that the control can be resized to a height that is smaller than the minimum height that you specified in the previous step.
NOTE: If an application requires functionality that allows the height of an edit control to be sized smaller than the height of one line of text, you can use the Microsoft Rich Textbox Control.

Modification Type:MajorLast Reviewed:5/3/2001
Keywords:kbbug kbButton kbCtrl kbDSupport kbForms kbIDEProject KB201509