How to dynamically resize a textbox in C#

后端 未结 4 1245
情书的邮戳
情书的邮戳 2020-12-22 02:23

I am new to C# user interface. I have created a window as shown in the first image. But if the user drag the window and make it bigger, I would like for it to make each

4条回答
  •  半阙折子戏
    2020-12-22 03:22

    Make use of TableLayoutControl. You can have one control per cell of that table. Now, on that table, you set:

    Dock: Fill
    Column Width: Percentage or absolute value as per needs
    Row Height: Percentage or absolute value as per needs
    

    On the controls, like textboxes in your case, set Dock to Fill.

    Read about it and try. If you get stuck, do come back with questions.

提交回复
热议问题