Adjusting spacing between usercontrols in a FlowLayoutPanel

前端 未结 1 637
温柔的废话
温柔的废话 2020-12-29 22:40

I\'m building a WinForms application Window (form), inside that I\'m using a FlowLayoutPanel, with usercontrols added to this. Now I\'ve been looking through the properties

相关标签:
1条回答
  • 2020-12-29 23:13

    Panel and other similar controls have both Margin and Padding properties. Padding determines spacing internal to the control ...such as a panel. If Padding is set to 3 (All) in a Panel control, then controls will snap to 3 pixels of padding against internal edges of the control.

    Margin works the same way, but between other controls. If Margin is set to 3 (All), controls will automatically snap to the margin spacing.

    I haven't used the FlowLayoutPanel but once and, IIRC, you can set padding for the cells. Check your margin on your user control, and check the padding for the layout cells. Set one to 0 and the other to 3.

    0 讨论(0)
提交回复
热议问题