Move row in TableLayoutPanel

visual-studio, visual-studio-2012, windows-forms-designer, winforms

Solution

To do it in the designer, you need a third, empty row to use, let's say you want to swap row 1 and row 2.

- Add an empty row 3.

- Move controls from row 1 > row 3

- Move controls from row 2 > row 1

- Move controls from row 3 > row 1

- Remove row 3

Yes, it's a workaround but it gets the job done.

Alternatively, you can change your code in the designer.cs file. There you can change the following:

this.myTableLayout.Controls.Add(this.myLabel1, 0, 0);//Change the order of these items.
this.myTableLayout.Controls.Add(this.myLabel2, 0, 1);

Problem

I can't figure out how to move a row of the `TableLayoutPanel` in the Designer. How do you do that? I cannot drag them, there are no buttons to move them up or down and moving all the controls from one row to another is just tedious and time consuming.

Original source