Winforms, creating padding when using Dock properties

后端 未结 3 2048
无人及你
无人及你 2021-01-04 01:40

How do I add padding, or some space between the textboxes when using dockstyle.top property?

for(int i =0; i< 10; i++) {
    textboxes[i] = new TextBox();         


        
3条回答
  •  不知归路
    2021-01-04 02:06

    Another work around that suits smaller layouts is to just add a Label control afterwards also docked to the Top, which is not AutoSized, Text=" ", Height=your padding. This is quite useful for the odd bit of padding when using the designer.

提交回复
热议问题