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

后端 未结 4 544
小蘑菇
小蘑菇 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:31

    The AutoSize property is there, just inherit from TextBox and you can get to the property:

    public class TextBoxEx : TextBox {
    
      public TextBoxEx() {
        base.AutoSize = false;
      }
    
    }
    

提交回复
热议问题