实现效果:
知识运用:
TextBox控件的Multiline属性
public overrider bool Multiline{ get;set;}
实现代码:
private void button1_Click(object sender, EventArgs e) { textBox1.Location = new Point(0,0); textBox1.Multiline = true; textBox1.Width = this.Width; textBox1.Height = ClientRectangle.Height - button1.Height - 3; }