I have a vertical split SplitContainer inside the top panel of a horizontal split SplitContainer and am trying to set the panel2 min size for it.
I'm getting the following designer error:
SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize.
This is somewhat confusing first of all, since the change was made in the designer. In the first instance therefore, I'm assuming this is a bug in the designer.
The logic of the error message is that SplitterDistance should be between 0 and 560 minus 243 i.e. 317 which at 311 it is.
Has anyone else come across this or have a workaround
// // splitContainer2 // this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer2.Location = new System.Drawing.Point(0, 0); this.splitContainer2.Name = "splitContainer2"; // // splitContainer2.Panel1 // this.splitContainer2.Panel1.Controls.Add(this.chartGroup); // // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.capacityGroup); this.splitContainer2.Panel2MinSize = 243; this.splitContainer2.Size = new System.Drawing.Size(560, 250); this.splitContainer2.SplitterDistance = 311; this.splitContainer2.TabIndex = 5;