title: How to make two GroupBoxes of the same height?
body: <p>I am trying to build an user control in C#/.NET 4.0/WinForms that would contain two (or more) <code>GroupBox</code> elements placed above each other, first one touching the top border of my user control while last one touching the bottom line.</p>
  
  <p>I would also want the height of these <code>GroupBox</code> elements to be all the same, and on top of that (now this seems to be the difficult part), all of it has to work flawlessly when user changes the height of the application window. So far I have not been able to find any combination of the <code>Anchor</code> property that would accomplish just this so I am starting to think that writing a custom resize handler would be the only option, but before I delve into such (in my eyes) dirty solution, I was wondering if there is some easy way to create user control that would fit my description?</p>
  
  <p><a href="http://i.stack.imgur.com/DggXs.png" rel="nofollow">Here</a> is an illustration of what I want to accomplish, <a href="http://i.stack.imgur.com/PSr6l.png" rel="nofollow">here</a> is what happens if top <code>GroupBox</code> has <code>Top</code> and <code>Left</code> <code>Anchor</code> and bottom one has <code>Top</code>, <code>Bottom</code> and <code>Left</code> and the application window gets resized slightly (bottom one takes all the extra space instead of both GroupBoxes sharing it equally) and finally, <a href="http://i.stack.imgur.com/hjQat.png" rel="nofollow">here</a> is what happens if I use the properties from previous example but add a <code>Bottom</code> <code>Anchor</code> to the upper <code>GroupBox</code>.</p>
  
  <p>Thanks in advance!</p>