Change the Textbox height?

后端 未结 21 2261
心在旅途
心在旅途 2020-12-09 07:24

How do I change the height of a textbox ?

Neither of the below work:

this.TextBox1.Size = new System.Drawing.Size(173, 100);
         


        
21条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-09 07:57

    All you have to do is enable the multiline in the properties window, put the size you want in that same window and then in your .cs after the InitializeComponent put txtexample.Multiline = false; and so the multiline is not enabled but the size of the txt is as you put it.

    InitializeComponent();
    txtEmail.Multiline = false;
    txtPassword.Multiline = false;
    

提交回复
热议问题