Windows Forms :Designing the Layout using a TableLayoutPanel, with auto-expand panels
Windows Forms :Designing the Layout using a TableLayoutPanel, with auto-expand panels Background TableLayoutPanel is a control that "Represents a panel that dynamically lays out its contents in a grid composed of rows and columns" (From MSDN: TableLayoutPanel Class ). Basic Requirement In this sample, we are required to build a simple manual entry form like the below, with some conditions: Whatever the size of the form (down to a certain extent), even when the form is maximized, the following should always remain true: The size of the text boxes must remain equal for all text boxes, and they must fill the largest space available The labels must all be left aligned The Grid View must fill all of the remaining space A small refresh button must exist below the Grid, it must always be aligned to the right of the form. Implementation First let us create a new Windows Forms Applications Project. Expand the main form, and add a new TableLayoutPanel c