title: Auto arrange controls in tiles mode in Panel
body: <p>I have numerous <code>Button</code> in a <code>Panel</code> and would like to rearrange them in order to get tiles.</p>
  <p><img src="https://i.stack.imgur.com/anlaz.png" alt="enter image description here" /></p>
  <p>What efficient algorithm can do that?</p>
  <p><strong>UPDATE</strong></p>
  <p>In order words I'm looking for the same result as thumbnails displayed in Google Images result page.</p>