Why can't I alter the height of a TextBox control in the windows forms design view?

awright18 picture awright18 · Jan 4, 2012 · Viewed 49.1k times · Source

I have a new project. I drop a textbox control on it. I open up the properties window, and I can change the height and hit enter or click out of the box and it will update the designer, but when I try to change the height it resets back to the default value. Why is that? I had the same issue with a Label, but I turned off AutoSize and it allowed me to modify the values. Is there some property I can turn off to be able to modify the Height of a textbox in the design view? I'm using Visual Studio 2010 sp1. I had the same issue in Visual Studio 2008. I am new to Windows forms.

Answer

adatapost picture adatapost · Jan 4, 2012

You need to set TextBox.Multiline property as true .

TextBox1.Multiline = true;