How to make the panel gaps constant width

BenTam 1,581 Reputation points

Dear All,

I'd like to make the Panel Gaps constant width on resizing the form. Could anyone suggest a way to do it?


An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,512 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jiale Xue - MSFT 41,736 Reputation points Microsoft Vendor

    Hi @BenTam , Welcome to Microsoft Q&A.

    Please use the control's [Margin]( margin) property.

    Best Regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

1 additional answer

Sort by: Most helpful
  1. Lex Li (Microsoft) 4,987 Reputation points Microsoft Employee

    If you are working on WinForms, you might put a TableLayoutPanel on the form, and define carefully columns (3 columns with equal length, while a 4th with fixed length), and then drop other controls into the columns so that they can fill up the columns and auto-size to fit in.

    WPF/UWP/WinUI gives you extra flexibility on managing control arrangement with layout tools.