title: SplitContainer Panel Resize Issue
body: <p><strong>The General Problem</strong></p>
  
  <p>The application is C# WinForms .Net 4.0.</p>
  
  <p>I have a <code>SplitContainer</code> that takes up most of the form, it is set to Anchor in all directions so it re-sizes along with the form. The left panel (Panel1) has a simple menu, no problems here. The right panel (Panel2) is more complex and contains a number of nested tab controls (with lots of controls) - it is painfully complex, but it's not changing.</p>
  
  <p>The problem is that re-sizing the form doesn't work so well. In fact, if you resize by dragging the edges slowly then it works ok, but drag quickly or use the "restore" button (top-right of form) then the issue occurs.</p>
  
  <hr>
  
  <p><strong>My Control Hierarchy</strong></p>
  
  <p>The following is a simple example of my control hierarchy, its definitely a cut down version but does highlight the nested tab control which may help with replication:</p>
  
  <ul>
  <li>Form
  
  <ul>
  <li>Split Container (anchor: top, left, bottom, right)
  
  <ul>
  <li>SC Panel1 (min width: 300)
  
  <ul>
  <li>TreeViewControl (forget what it is called)</li>
  </ul></li>
  <li>SC Panel2
  
  <ul>
  <li>Panel (anchor: top, left, bottom, right)
  
  <ul>
  <li>Tab Control (anchor: top, left, bottom, right)
  
  <ul>
  <li>Tab Control w/ lots of pages that overflow screen and require the navigation buttons to show in top right corner (anchor: top, left, bottom, right)</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <hr>
  
  <p><strong>Debug Details</strong></p>
  
  <p>After some debugging it appears that it is in fact <code>Panel2</code> (a child of the split container) that doesn't resize properly, and the actual <code>SplitContainer</code> itself resizes fine.</p>
  
  <p>Here are the debug values that show this...</p>
  
  <p>Full width form, before resize:</p>
  
  <pre><code>splitContainerMain.Width: 1479
  splitContainerMain.Panel2.Width: 1206
  panelCenter.Width: 1203
  tabControlMain.Width: 1215
  </code></pre>
  
  <p>All as expected, <code>splitContainerMain.Panel2.Width</code> is smaller than <code>splitContainerMain.Width</code>.</p>
  
  <p>After resize where the issue occurs:</p>
  
  <pre><code>splitContainerMain.Width: 815
  splitContainerMain.Panel2.Width: 1206
  panelCenter.Width: 1203
  tabControlMain.Width: 1215
  </code></pre>
  
  <p>As can be seen, the <code>splitContainerMain.Width</code> has resized as desired, but the <code>splitContainerMain.Panel2.Width</code> and subsequently its children have not.</p>
  
  <p><strong>NOTE</strong>: Please remember, the width updates correctly if I manually resize the form slowly - this is not a problem with me not correctly setting any anchors.</p>
  
  <hr>
  
  <p><strong>My Efforts So Far</strong></p>
  
  <p>What I have tried to do is use various Form resize events and try to set the widths manually, but to no avail. I think what I would like to try is to set the <code>Panel2.Width</code> value from within an event of some sort.</p>
  
  <hr>
  
  <p><strong>What I Am Looking For</strong></p>
  
  <ul>
  <li>Is there anyway to force <code>splitContainerMain.Panel2.Width</code> to resize correctly when the <code>splitContainerMain</code> size changes?</li>
  <li>Alternatively, how can I calculate what the <code>Panel2.Width</code> should be? And how can I set that value from the <code>Form.Resize</code> event? (or another event?)</li>
  </ul>