Changing WinForms TextBox to BorderStyle.None causes text to be cut off

后端 未结 4 522
小蘑菇
小蘑菇 2021-01-13 11:08

i\'ve changed a WinForms TextBox control to have no border.

When i do the bottom pixel row of text in the box is being cut off.

Top:

4条回答
  •  迷失自我
    2021-01-13 11:30

    This seems to do the trick:

    public Form2()
    {
        InitializeComponent();
        textBox1.Multiline = true;
        textBox1.MinimumSize = new Size(0, 30);
        textBox1.Size = new Size(textBox1.Size.Width, 30);
        textBox1.Multiline = false;
    }
    

提交回复
热议问题