This problem doesn’t happen for all instance but this code block:
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60.99398F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 39.00602F));
this.tableLayoutPanel1.Controls.Add(this.pbxInspectionDisplay, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.gbxEggInput, 0, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 57);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1182, 570);
this.tableLayoutPanel1.TabIndex = 28;
At the table layout, pbxInspectionDisplay is unexpectedly located on right and gbxEggInput on left. If I replace corresponding part above with following code
this.tableLayoutPanel1.Controls.Add(this.gbxEggInput, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.pbxInspectionDisplay, 0, 0);
they are located in right order (pbxInspectionDisplay on left and gbxEggInput on right). As I said, in other code block, first control is located on left and second one on right. So I am trying to understand what made the difference. Can somebody explain why this happens?
I believe that you would want to specify the column in which you’re adding the controls. Something like this: